Trying to write login function using ajax

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: 

  1.  $scope.login = function() {
  2.     $.ajax({
  3.         type: "POST", url: "http://ce.mauris.info/en/api/auth",
  4.         data: {email: "test@test.com", password: "1111"}
  5.     }).done(function( msg ) {
  6.         $location.path('/app/feed');
  7.     });
  8.   } // 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?