I'm trying to create a simple single page application make in use Django+Django Rest Framework+Angularjs. After successful login/password form I should redirect to the page with list of contact, where I can add it or remove. For my back-end I'm going to use tutorial from here http://www.django-rest-framework.org/tutorial/quickstart/, and simple login/password page will look like this
<html ng-app="myApp">
<head>
<title></title>
</head>
<body ng-controller="AppController as ctrl">
<form ng-submit="ctrl.submit()">
<input type="text" ng-model="ctrl.user.username" placeholder="Enter your name"/><br/><br/>
<input type="text" ng-model="ctrl.user.password" placeholder="Enter your Password"/><br/><br/>
<input type="submit" value="Submit">
</form>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.4/angular.js">
</script>
<script>
angular.module('myApp', [])
.controller('AppController', [function() {
var self = this;
self.submit = function() {
console.log('Form is submitted with following user', self.user);
};
}]);
</script>
</body>
</html>
And I can't understand how can I submit login/password form from front-end side to the back-end side of application?