Friday, October 30, 2015

Angular Recipe: Manipulate Dom

Angular JS


Manipulating the DOM from your directive is fairly simple.
You just have to use link function instead of controller into your directive.
Inside directives, it is best practice to use controller only when you want to share functions with other directives. All other times you should use link.

2 comments: