The cookbook form examples on the AngularJS site only save the state on the client. How do I submit to the server?
Alternatively, how do I use jQuery\'s form.submi
Note, there is strict separation of view (your html template) and logic (your JS code) - mainly because of testability.
The right way is to just send your model to the server, using $resource (for REST) or low level $http. Instead of doing the job in the template.
Simple example - HTML template
First:
Last:
JavaScript - controller
function FormCntl($scope, $http) {
$scope.save = function() {
$http.put('/save.py', $scope.person);
};
}