<!DOCTYPE html>
<html>
    <head>
        <title>Wikitechy AngularJS Tutorials</title>
        <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"> </script>
    </head>
    <body>
        <div ng-app="" >
            <form name="myForm">
                <ng-form name="Form">
                    <h3>ng-form Directive example in AngularJS</h3>
                    UserName:
                    <input type="text" name="username" ng-model="uname" required /><br/><br/>
                    Password:
                    <input type="text" name="password" ng-model="passname" required /><br/>
                </ng-form>
            </form>
            <p>form valid= <b>{{myForm.$valid}}</b></p>
            <p>form.Username.$valid= <b>{{Form.username.$valid}}</b></p>
            <p>form.password.$valid= <b>{{Form.password.$valid}}</b></p>
        </div>
    </body>
</html>

 


www.wikitechy.com © Copyright 2016. All Rights Reserved.