AngularJS Developer Question:
Download Questions PDF

What is the difference between link and compile in Angular.js?

Answer:

☛ Compile function is used for template DOM Manipulation and to collect all the directives.
☛ Link function is used for registering DOM listeners as well as instance DOM manipulation and is executed once the template has been cloned.

Download AngularJS Developer Interview Questions And Answers PDF

Previous QuestionNext Question
Explain data binding in AngularJS?Tell me what is linking function and type of linking function?