Run Javascript AFTER Angular Has Finished Loading All Views

后端 未结 6 1338
抹茶落季
抹茶落季 2020-12-24 12:10

I am building a web application using Angular, and I am trying to find a way to wait until all of the data-ng-include elements have been evaluated and the inclu

6条回答
  •  不思量自难忘°
    2020-12-24 12:40

    Use ng-cloak to delay templates being shown before compilation. You can also add a hidden field as the very last child to your html element that has ng-cloak (better to use it in body tag or wherever your ng-app starts) and then you can check for existence of this hidden element in an interval loop

    Your hidden field part would be like this

提交回复
热议问题