Question: explain what is the difference between link and compile in angularjs?
Answer: Compile: traverse the DOM and collect all of the directives. Link: combine the directives with a scope and produce a live view. Any changes in the scope model are reflected in the view, and any user interactions with the view are reflected in the scope model.