Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html ng-app="myApp">
- <body ng-controller="userCtrl">
- <div class="centerForm">
- <form>
- <div class="form-group">
- <label for="exampleInputUser">Username</label>
- <input type="username" ng-model="userName" class="form-control" id="exampleInputUser" placeholder="username">
- </div>
- <div class="form-group">
- <label for="exampleInputPassword1">Password</label>
- <input type="password" ng-model="userPassword" class="form-control" id="exampleInputPassword1" placeholder="Password">
- </div>
- <table class="nav" align="center">
- <tr>
- <td>
- <p><button type="submit" class="btn btn-primary" ng-click="saveUser()">Submit</button>
- <a href="#" class="btn btn-info" role="button">Sign Up</a></p>
- </td>
- </tr>
- </table>
- </form>
- </div>
- </body>
- </html>
- <script>
- angular.module('myApp', [])
- .controller('userCtrl', function($scope) {
- $scope.userName ="";
- $scope.userPassword="";
- $scope.myData = new Firebase( "https://myfirebaseapp.firebaseio.com/")
- $scope.saveUser = function() {
- $scope.myData.push({userName: $scope.userName});
- };
- });
- </script>
- <html ng-app="myApp">
- <body ng-controller="userCtrl">
- <div class="centerForm">
- <form>
- <div class="form-group">
- <label for="exampleInputUser1">Username</label>
- <input type="username" ng-model="userName" class="form-control" id="exampleInputUser1" placeholder="username">
- </div>
- <div class="form-group">
- <label for="exampleInputPassword1">Password</label>
- <input type="password" ng-model="userPassword" class="form-control" id="exampleInputPassword1" placeholder="Password">
- </div>
- <table class="nav" align="center">
- <tr>
- <td>
- <p><button type="submit" class="btn btn-primary" ng-click="loginUser()">Submit</button>
- <a href="#" class="btn btn-info" role="button">Sign Up</a></p>
- </td>
- </tr>
- </table>
- </form>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement