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
Anilananda Chakrabortty
NA
425
77.6k
How to showa bootstrap alert inside anguularjs post method
Aug 2 2017 3:02 AM
Hi,
This is my angularjs controller...
///
var app = angular.module("Homeapp", []);
app.controller("HomeController", function ($scope, $http) {
$scope.btnText = "Save";
$scope.savedata = function () {
$scope.btnText = "Plz Wait !";
debugger;
$http({
method: 'POST',
url: '/Home/Register',
data: $scope.register
}).then(function (success){
$scope.register = null;
$scope.btnText = "Save";
//alert('Data Registered');
$scope.IsVisible = true;
},function (error){
alert('Faild');
});
}
});
=======================
<div class="alert alert-success alert-dismissable" id="success-alert">
Success<button type="button" class="close" data-dismiss="alert" alial-label="close">x</button>
</div>
====================
I want to show the bootstrap alert message when the data will be sucessfully saved insted of normal alert method....
for success.... class=alert-success
for faild ..... class= alert-danger ...
===============================Can any one tell me plz..............
Reply
Answers (
2
)
Help with creating two fields on Ionic-1 app
angular validation