If you are building an Angular.js application and wish to add a modal dialog box or a simple popup, then the ngDialog module provides an easy, simple solution. It provides two default css themes and we can also add our own custom themes.
Let's see how to create a simple dialog box with ngDialog.
For our example, we will have a base page with a button which when clicked will open a contact-us form as dialog box. The dialog box will have an 'OK' button which will save the changes and close the box and a 'Cancel' button which will just dismiss the box.
1. First, you need to download ngDialog.js and ngDialog.css (and the themes that you want) from https://github.com/likeastore/ngDialog
2. Create the base template - 'base.html'
3. Create the dialog box template - 'contact_us.html'
closeThisDialog() and confirm() are ngDialog's methods and they return an Angular promise object that is either rejected or resolved.
4. Angular.js code to handle the promise:
Now if you wish to add a popup message as per the response success or failure:
The plain option, if set to 'true' allows to use a plain string as template.
The API also provides a lot of other useful options and event handlers.
Excelente que bueno estaba buscando esto y no lo encontré en otra parte muy bueno aunque no me sale llamando a un HTML externo me sale con un script dentro del mismo base html
ReplyDeleteI really like your article. You’ve mentioned steps which can be easily understood. Check out Yiioverflowto know more about Angular JS development.https://yiioverflow.com/
ReplyDeleteThanks for one marvelous posting! I enjoyed reading it; you are a great author. I will make sure to bookmark your blog and may come back someday. I want to encourage that you continue your great posts, have a nice weekend!
ReplyDeleteOnline training in USA
Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here. we are providing AngularJs training in velachery.
ReplyDeletefor more details: AngularJs training in velachery
thanks for shared your knowledge
ReplyDeleteFull Stack Training in Chennai | Certification | Online Training Course | Full Stack Training in Bangalore | Certification | Online Training Course | Full Stack Training in Hyderabad | Certification | Online Training Course | Full Stack Training in Pune | Certification | Online Training Course | Full Stack Training | Certification | Full Stack Online Training Course
Nice post.
ReplyDeleteEthical hacking training
Informatica data Quality Training
Informatica idq training
PERDE MODELLERİ
ReplyDeletesms onay
vodafone mobil ödeme bozdurma
nft nasıl alınır
Ankara evden eve nakliyat
trafik sigortasi
dedektör
Web site kurmak
aşk kitapları
ReplyDeleteThank you for your great post. Eligible travelers who want to get medical visa India can easily complete the application by providing some required details. Medical visa is a short term visa granted for medical treatment reasons.
SMM PANEL
ReplyDeleteSMM PANEL
is ilanlari blog
instagram takipçi satın al
hirdavatciburada.com
Https://www.beyazesyateknikservisi.com.tr
servis
Tiktok Para Hilesi İndir
kadıköy bosch klima servisi
ReplyDeletemaltepe arçelik klima servisi
pendik mitsubishi klima servisi
ataşehir beko klima servisi
maltepe lg klima servisi
üsküdar daikin klima servisi
çekmeköy vestel klima servisi
ümraniye arçelik klima servisi
beykoz samsung klima servisi
en son çıkan perde modelleri
ReplyDeleteminecraft premium
lisans satın al
özel ambulans
nft nasıl alınır
yurtdışı kargo
uc satın al
en son çıkan perde modelleri