1

I have an application where I need to to some computation based on the final height of the content. Is there a generic event that fires when Angular is done rendering the current scope? Alternatively, is there a way to get notified if the DOM will no longer be modified (but is not nessecarily rendered yet)?

To clarify: I am not looking for an equivalent of DOM ready. ideally I'd like a notification every time any model changes have propagated to the dom. I am aware that i can watch angular expressions and have built a workaround that basically gets called x milliseconds after the last call of a watcher on a given expression. I thought however that there is a more 'angular way' to do that.

msung
  • 3,562
  • 3
  • 19
  • 30
  • There is no end in DOM rendering . When you use angular view is changed when model changed. So your actual event is model change event. You can watch your model. – Alborz Jan 27 '14 at 08:27
  • if you happen to be using ngView, there is an event called $viewContentLoaded. http://docs.angularjs.org/api/ngRoute.directive:ngView – Jake Johnson Jan 27 '14 at 11:59

1 Answers1

1

Angular has not provided a way to trigger an event when a page finished loading.

I found a great answer by Lior who says "Angular hasn't provided a way to signal when a page finished loading, maybe because 'finished' depends on your application..."

full answer here.

Community
  • 1
  • 1
Alex Choroshin
  • 6,177
  • 2
  • 28
  • 36