Monday, November 5, 2018

javascript - What is the calling order of angularjs functions (config/run/controller)?




There are




  • controllers

  • constants

  • directives

  • services


  • factory

  • run

  • config

  • filters



functions of angular.js. What is the calling order of all these modules?


Answer



Learning this I made a fiddle observing the behaviour by console.log. Its like





  • app config

  • app run

  • directive setup

  • directive compile

  • (app controller dependencies)


    • service

    • factory


    • inner factory

    • inner service


  • app controller

  • filter

  • directive linking

  • filter render (w.r.t the markup)



Observe yourself here (Check Console).




EDIT



New Fiddle with filters added


No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...