TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Md Ghouse
NA
63
12.8k
why buttons not fired
Jul 19 2016 6:18 PM
<div ng-controller="pucdes">
<form name="f1" ng-submit="Savedata(apis)">
<div>
{{mess}}
</div>
<input type="text" name="jjj" ng-class="Submitted?'ng-girty':''" required autofocus />
<span class="Error" ng-show="(f1.jjj.$dirty ||Submitted) && f1.jjj.$error.required">kkkkkkk</span>
{{mess}}
<input type="submit" ng-click="myFunction()" value="Savedata">
<input type="submit" ng-click="myFunction2()" value="Editdata">
</form>
</div>
angular.module("MyApp")
.controller("pucdes", function ($scope, locationder) {
$scope.Savedata = function () {
$scope.Submitted = true;
alert("ppp");
locationder.Sessiondata2($scope.myFunction)
.then(function (d) {
alert('fjfbffbjbf')
$scope.mess = "jjjjjjj.......sucess.......";
})
locationder.Sessiondata($scope.myFunction2)
.then(function (d) {
$scope.mess = "jjjjjjj.......sucess.......";
})
}
})
.factory("locationder", function ($http, $q) {
var fac = {};
fac.Sessiondata2 = function () {
// var defer = $q.defer();
$http({
url: '/Home/pubs3',
method: "POST",
data: JSON.stringify(),
headers: { 'content-type': 'application/json' }
})
}
fac.Sessiondata = function () {
$http({
url: '/Home/pubs2',
method: "POST",
data: JSON.stringify(),
headers: { 'content-type': 'application/json' }
})
}
//return defer.promise;
// }
return fac;
});
Reply
Answers (
2
)
How to handle page unload in angular?
how to handle multiple buttons using mvc & angularjs