javascript - Inserting removing elements from the DOM -


i have code inserts div content whenever user clicks button. angularjs way insert or remove elements dom?

if elements want add somehow related or near button, use directive. dom manipulation performed directive.

however, there seems exception rule: if want insert modal dialog box -- i.e., doesn't have placed somewhere specific -- might want use service. listen few minutes of misko regarding this.

if want dialog, see http://angular-ui.github.io/bootstrap/#/dialog , here so answer uses in plunker.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -