Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lazyload external JS/CSS files based on controller namespace convention?

Does angularJS have anything in place to lazyload external JS/CSS files based on ng-controller namespaces? So that the following would append com.myApp.SomeClass.js and com.myApp.SomeClass.css to the document head?

<div ng-controller="com.myApp.SomeClass"></div>
like image 725
Lee Owen Avatar asked Oct 23 '22 03:10

Lee Owen


1 Answers

Not yet, but it is in the works post v1.0.

Is your app so big that you need it? We have some impressively big apps, and have not run into this need yet, since the controllers are much more dense then when writing the same behavior without angular.

like image 94
Misko Hevery Avatar answered Nov 02 '22 09:11

Misko Hevery