AngularJS: lazy loading controllers and content

后端 未结 9 862
小鲜肉
小鲜肉 2020-12-02 19:00

In this simplified scenario, I have two files: index.htm, lazy.htm.

index.htm:

var myApp = angular.module(\'myApp\', []);
myApp.controller(\'embed\',         


        
9条回答
  •  猫巷女王i
    2020-12-02 19:33

    Try this ARI plugin for Angular JS. It helps you to lazy load the controller scripts on demand.

提交回复
热议问题