Guest User

Untitled

a guest
Mar 22nd, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <script
  4. src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js">
  5. </script>
  6. <body>
  7. <div ng-app="myApp" ng-controller="myCtrl">
  8.  
  9. First Name: <input type="text" ng-model="firstName"><br>
  10. is Branch Manager? <input type="checkbox" ng-model="checkbox"><br>
  11. <button name="subject" type="submit" value="Save">Save</button>
  12. <br>
  13.  
  14.  
  15. </div>
  16.  
  17. <script>
  18. var app = angular.module('myApp', []);
  19. app.controller('myCtrl', function($scope) {
  20. $scope.function = function(){
  21. if($scope.checkbox)
  22. {
  23. if($("#firstName").isEmpty())
  24. {
  25. alert("first name is empty");
  26. }
  27. }
  28. });
  29. </script>
  30.  
  31. </body>
  32. </html>
Add Comment
Please, Sign In to add comment