Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Login(username, password, callback) {
- var user = {username:username, password:password};
- var data = JSON.stringify(user);
- $http.post('http://127.0.0.1:8000/socialnet/auth/',data)
- .success(function (response) {
- callback(response);
- })
- .error(function(response){
- alert("some error happened");
- });
- }
- function login() {
- vm.dataLoading = true;
- AuthenticationService.Login(vm.username, vm.password, function (response) {
- AuthenticationService.SetCredentials(vm.username, vm.password,response.author);
- });
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement