Angular bootstrapping after load of html

后端 未结 4 385
不知归路
不知归路 2020-12-31 08:45

I first initialize my app with ng-app=\"myApp\" in the body tag and this works fine for all angularized-html that is loaded on first page load.

Later on I have some

4条回答
  •  萌比男神i
    2020-12-31 09:32

    Loading an AngularJS controller dynamically

    The answer to this question fixed my problem. Since I need to create the controllers after the content was added to the DOM. This fix requires me too register controllers after I have declared it. If someone has an easier solution pleace chip in.

提交回复
热议问题