0

Being bit confused as per the following 2 blogs:

I. Eric W Green - Toptal https://www.toptal.com/angular-js/angular-js-demystifying-directives

Order of execution

Compile -> Controller -> PreLink -> PostLink

II. JsonMore http://jasonmore.net/angular-js-directives-difference-controller-link/

Order of execution

Controller -> Compile -> PreLink -> PostLink

The answer to complex problem difference between controller & link is given here -- use code in controller if required before compile OR write in link if code to be run after compile.

But, blog 1 says both run after compilation. Please, suggest which one is correct?

1

1 Answer 1

1

The concept is as a matter of fact baffling , but ones you understand the actual flow, it would remain clear throughout.

The actual order of execution is ..Compile -> Controller -> Pre-Link -> Post-Link

For further understanding, just go through this article, it surely helped me.

Hope this helps.

Cheers

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.