Trying to create a contact form and feedback form for my website. Here is my controller in angular that I'm using however I need to understand what's going on with my routes and how to implement this inside MEAN.JS please advice:
angular.module('core').controller('FormCtrl',['$scope','$http', function($scope,$http) {
$scope.postMail = function (data) {
$http.post('/mail', data).success(function(data, status, headers, config) {
alert('success');
//close function....??
}).error(function(data, status, headers, config) {
});
};
}]);//formController ends
Aucun commentaire:
Enregistrer un commentaire