Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Yehuda Menahem
Yehuda Menahem
5,402 Points

How to know when angular finished loading (all app)

Hey,

I wanted to know if there is a way to know when angular finished loading. An event / directive / creative idea that will be able to give me the ability to fire some function after angular loaded - all the Html rendered

@chalkers

Someone can help me with it?

Thank you, Yehuda

2 Answers

Yehuda Menahem
Yehuda Menahem
5,402 Points

Thank you Seth,

I read. Can you be a bit more specific about how to do it? Sorry, I'm new in Angular

The main purpose is to add an attribute and more manipulations with js
(I need to do something generic for the user[developer] control) only after all angular directives and placeholders loaded in page

James Churchill
STAFF
James Churchill
Treehouse Teacher

Yehuda,

If you're looking to manipulate the DOM, then I think it would make sense to create a custom directive. Without knowing more about your specific situation, it's difficult to know the "best" way to accomplish what you're looking for. If you can provide more details (maybe even a link to a GitHub repo?) I'd be happy to explore this further with you.

Additionally, check out this GitHub issue: https://github.com/angular/angular.js/issues/734

The answer to your question might be amongst the various solutions/suggestions in that issue thread.

Thanks ~James