Hi,
Here is what I wrote it, please let me know where I am going wrong.

<!DOCTYPE html>
<html>
<body>

<div ng-app=""  ng-controller="validate">
 

<p>UserID: <input type="text" ng-model="userid"></p>

<p>Password: <input type="password" ng-model="password"></p>

<button type="button" ng-click="fun()"> Submit </button>

</div>

<script>
function validate($scope) {
  
        userid: "John";
        password: "Doe";

        $scope.fun=function()
{
        if(userid=="John" && password=="Doe")
        alert('Success: ');
        else
        alert('not success: ');
}
}
</script>
<script src="angular.min.js"></script>

</body>
</html>


Regards
Suman P.

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to