Advertisement
Guest User

Untitled

a guest
Mar 4th, 2016
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.33 KB | None | 0 0
  1. <html ng-app="myApp">
  2. <body ng-controller="userCtrl">
  3. <div class="centerForm">
  4.  
  5. <form>
  6. <div class="form-group">
  7. <label for="exampleInputUser">Username</label>
  8. <input type="username" ng-model="userName" class="form-control" id="exampleInputUser" placeholder="username">
  9. </div>
  10. <div class="form-group">
  11. <label for="exampleInputPassword1">Password</label>
  12. <input type="password" ng-model="userPassword" class="form-control" id="exampleInputPassword1" placeholder="Password">
  13. </div>
  14. <table class="nav" align="center">
  15. <tr>
  16. <td>
  17. <p><button type="submit" class="btn btn-primary" ng-click="saveUser()">Submit</button>
  18. <a href="#" class="btn btn-info" role="button">Sign Up</a></p>
  19. </td>
  20. </tr>
  21. </table>
  22. </form>
  23.  
  24. </div>
  25. </body>
  26. </html>
  27.  
  28. <script>
  29. angular.module('myApp', [])
  30. .controller('userCtrl', function($scope) {
  31. $scope.userName ="";
  32. $scope.userPassword="";
  33.  
  34. $scope.myData = new Firebase( "https://myfirebaseapp.firebaseio.com/")
  35.  
  36. $scope.saveUser = function() {
  37. $scope.myData.push({userName: $scope.userName});
  38. };
  39.  
  40. });
  41.  
  42.  
  43.  
  44.  
  45.  
  46. </script>
  47.  
  48. <html ng-app="myApp">
  49. <body ng-controller="userCtrl">
  50. <div class="centerForm">
  51.  
  52. <form>
  53. <div class="form-group">
  54. <label for="exampleInputUser1">Username</label>
  55. <input type="username" ng-model="userName" class="form-control" id="exampleInputUser1" placeholder="username">
  56. </div>
  57. <div class="form-group">
  58. <label for="exampleInputPassword1">Password</label>
  59. <input type="password" ng-model="userPassword" class="form-control" id="exampleInputPassword1" placeholder="Password">
  60. </div>
  61. <table class="nav" align="center">
  62. <tr>
  63. <td>
  64. <p><button type="submit" class="btn btn-primary" ng-click="loginUser()">Submit</button>
  65. <a href="#" class="btn btn-info" role="button">Sign Up</a></p>
  66. </td>
  67. </tr>
  68. </table>
  69. </form>
  70.  
  71. </div>
  72. </body>
  73. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement