AngularJS directive loaded dynamically in ng-include do not work

时光怂恿深爱的人放手 提交于 2019-12-04 21:31:50

Just use RequireJS to load the controllers, directives, and so on.

Using special plugins, CSS and HTML files can be loaded too.

Here is a great example from Ben Nadel: http://www.bennadel.com/blog/2554-Loading-AngularJS-Components-With-RequireJS-After-Application-Bootstrap.htm

All JS files should be included in 'index.html' JS files (services, modules, controllers) loaded dynamically using ng-include will not work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!