Loading…

What is linking function? What are post linking and pre-linking functions?

Links combine the directives with a scope and help in producing a view. The link function registerS DOM listeners and for updating the DOM. It gets executed once the template is cloned.

The pre-linking function gets executed before linking the child elements. Pre-linking is not safe for DOM transformation. Post linking is executed after linking the child elements. Post linking is safe for DOM transformation.

Suggest An Answer

No suggestions avaliable!

Latest post from Angularjs Interview Questions

Ask Question