Advertisement
Guest User

Untitled

a guest
Nov 4th, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. .factory 'User',($window,$rootScope,Restangular)->
  2. {
  3. auth: (username,password)->
  4. Restangular.all 'auth/login/'
  5. .post {username:username,password:password}
  6. .then (response)->
  7. return response
  8. ,(response) ->
  9. return response
  10. .....
  11.  
  12. $scope.login = ()->
  13. $scope.running = 1
  14. console.log User.auth $scope.username,$scope.password
  15. $scope.running = 0
  16. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement