Thanks for the post - I regularly use a lot of these, and I'm a big fan of ng-bind attribute over the {{ thing }} approach. Things that really caught my eye: - ng-list: sounds very useful for user forms, tagging, etc - ng-switch: I dont know how many times I've used ng-show to replicate this functionality. Thank you!
Little-known directives of Angular.js
21–24 of 24 posts
Re: Little-known directives of Angular.js
#22What does "Flash Of Uncompiled Content" means?
Re: Little-known directives of Angular.js
#23ng-bind-html-unsafe has been removed in the latest release candidates, it won't be in 1.2 So try not to get attached.
Just use http://docs.angularjs.org/api/ng.$sce#methods_trustashtml on your data then use ng-bind-html. It does the same as ng-bind-html-unsafe.
Does it work in filters?
Re: Little-known directives of Angular.js
#24Thanks for the post - I regularly use a lot of these, and I'm a big fan of ng-bind attribute over the {{ thing }} approach. Things that really caught my eye: - ng-list: sounds very useful for user forms, tagging, etc - ng-switch: I dont know how many times I've used ng-show to replicate this functionality. Thank you!
Just to be clear (and as mentioned in a comment on the post), ng-switch is actually closer in functionality to using multiple ng-if directives (which is only in Angular 1.1.5+). ng-switch actually adds/removes the elements from the DOM, whereas ng-show just shows/hides the element.