Finished Loading of ng-include in angular js

后端 未结 6 529
春和景丽
春和景丽 2020-12-13 02:28

What is the best way to detect the end of html loading by ng–include? I want to write some code that runs when it has finished loading.

6条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-13 02:36

    you can use onload for it as below

    in controller,

    $scope.finishLoading = function() {
    
    }
    

    after loading the ng-include finishLoading scope function will call.

    here is the working Demo Plunker

提交回复
热议问题