1

Using JS, I need to wait until an Angular2 application has finished to initialize all these data and render the dom completely.

It should be done from outside the Angular2 application. I'm actually running pa11y and want to wait before to check accessibility. So it's as if I was in the JS console trying to know if rendering is complete.

Do I have any way to know it's done?

hollsk
  • 3,124
  • 24
  • 34
Yoann Augen
  • 1,966
  • 3
  • 21
  • 39
  • 1
    Possible duplicate of [AngularJS: How to run additional code after AngularJS has rendered a template?](http://stackoverflow.com/questions/12304291/angularjs-how-to-run-additional-code-after-angularjs-has-rendered-a-template) – CarlosCarucce Aug 31 '16 at 13:40
  • It's not a angularJS question. It's Angular2. – Yoann Augen Aug 31 '16 at 13:45
  • It is a "possible duplicate", it means it could or could not be a duplicate. Just check if the other question help you solve your problem =) – CarlosCarucce Aug 31 '16 at 13:49
  • Hi Yoann - Pa11y has a `--wait` flag built in that you can use on the command line or in a config file. Does this not do what you need? – hollsk Jan 13 '17 at 19:22

1 Answers1

1

I think the AfterViewInit is what you search :

https://angular.io/docs/ts/latest/api/core/index/AfterViewInit-class.html

Alexis Le Gal
  • 327
  • 4
  • 11