AngularJS Modal Popup open and close from controller
In this Post We Will Explain About is AngularJS Modal Popup open and close from controller With Example and Demo.
Welcome on infinityknow.com – Examples ,The best For Learn web development Tutorials,Demo with Example! Hi Dear Friends here u can know to Show a Twitter Bootstrap Modal with Angular.js Directives
In this post we will show you Best way to implement AngularJS Bootstrap-Modal with Custom URL Routing, hear for How to How to Open Twitter Bootstrap Modal Popup in AngularJS with Download .we will give you demo,Source Code and examples for implement Step By Step Good Luck!.
How to Open Twitter Bootstrap Modal Popup in AngularJS
In this POST I am going to simple provide some help on how we may required with Twitter simple bootstrap modal popup box while using it simple inside script like as a AngularJS controller simple methods or function, as well as generally we have to any event in AngularJS script where we want to simple modal open or close means hide and show to twitter bootstrap modal popup using AngularJS source code below.
Add below Modal popup HTML in your template:
[php]
[/php]
Open Modal Popup in AngularJS:
[php]
var Livemodeldata = angular.element(‘#my_live_modal_box’);
Livemodeldata.modal(‘show’);
[/php]
Close Modal Popup using AngularJS
We can use following simple AngularJS script to close your popup, just simple need to update your live the modal popup function here, as well show and hide means change show to hide.
[php]
var Livemodeldata = angular.element(‘#my_live_modal_box’);
Livemodeldata.modal(‘hide’);
[/php]
Prevent Twitter Bootstrap Modal Popup from closing when we click out side of the modal popup:
Simple Prevent Modal popup Box from closing using AngularJS
[php]
var Livemodeldata = angular.element(‘#my_live_modal_box’);
Livemodeldata.modal({
backdrop: ‘static’,
keyboard: false
});
[/php]
Note if we still simple want to close your modal popup by using any key to keyboard escape key as well as we simple make keyboard is source code below equal to true, as showing in below angular script Like as a…
close modal popup by using keyboard escape key
[php]
element.modal({
backdrop: ‘static’,
keyboard: true
});
[/php]
I hope you have Got Show a Twitter Bootstrap Modal with Angular.js Directives And how it works.I would Like to have FeadBack From My Blog(infinityknow.com) readers.Your Valuable FeadBack,Any Question,or any Comments abaout This Article(infinityknow.com) Are Most Always Welcome.