angularjs - Speeding up page load time by delaying execution of directive link function -
Some of my instructions take enough time to execute the link function. So this page load time is delayed
To make it fast, the window is intended to execute the linkfn. Load event
The approach that I am planning to do
directive ('Mydirective', function () (limited: 'a', scope: {}, link: function (Field, element, etters) {var unwatcher = scope. $ Watch ("$ viewcontentloaded", function () {unwatcher); // real link function that takes a lot of time to execute.}}}}
BTW does not guarantee execution after window using $ timeout (linkfn, 0).
checkout bindos and more Try this if you already have not
Comments
Post a Comment