Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. <div ng-controller="loginCtrl">
  2. username<input ng-model="username">
  3. password<input ng-model="password">
  4. <button ng-click="submit()">Send</button>
  5. </div>
  6.  
  7. angular.module('app',[]).controller('loginCtrl', function($scioe) {
  8. $scope.submit = function() {
  9. globalStore.dispatch({
  10. action: 'LOGIN',
  11. payload: {
  12. username: $scope.username,
  13. password: $scope.password
  14. }
  15. })
  16. }
  17. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement