Evening,
I'm using ngRoute + 1.3.5 at the moment, i have an admin page that has it's own admin view and controller.
I don't want the 'admin.js' script reference:
<script src="/Resources/Javascript/Controllers/ctrlAdmin.js"></script>
-in the index.html page - where the ng-view resides. I only want the route referenced (without injecting the controller).
.when('/admin', {
templateUrl: '/resources/html/views/admin.html'
// Look Mom, no controller reference........
})
If i include the reference to the 'admin.js' file within the view file, let's call it 'admin.html', i get a 'NaN function undefined'. However if i put it in the index.html page, all is great. I'd rather not, Angular is obviously trying to resolve all references before it loads, which is reasonable; but is there a way to do this cleanly?
Issue found here, it seems i didn't quite search enough.
https://github.com/angular/angular.js/issues/11384