I'm working in a Single Page web App, witch will require user/password protection. Modules will be loading depending on the user profile, to restrict the access on a roll-based manner.
I'm using ng-view
to load the templates corresponding the user id.
How can I selectively load the corresponding JavaScript file of the template's controller?
<script script src="restrictetd/path/MyAngularControl.js"></script>
There is no point in downloading a JavaScript file if the user has no access to that particular template.
I really appreciate any advice.