Trying to write login function using ajax
Hi everybody, i'm writing easy ajax login function using angularJs, but i got some question which relates ajax, this is my function:
- $scope.login = function() {
- $.ajax({
- type: "POST", url: "http://ce.mauris.info/en/api/auth",
- data: {email: "test@test.com", password: "1111"}
- }).done(function( msg ) {
- $location.path('/app/feed');
- });
- } // login
when i come to my login.html, i can just click on a button and go to '/app/feed' i thought that i have to enter data email and password first, I have not worked with ajax for a long time and many things forgotten, can somebody explain what i need to do, to complete this function after enter some data?