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
Post a Comment