I use MVC bundling to bundle JS files:
bundles.Add(new ScriptBundle("~/bundles/essentialjs").Include(
"~/Scripts/spa/features/exception/exceptionModule.js",
"~/Scripts/spa/features/exception/controllers/errorController.js"
));
I need to load these MVC bundles using OCLazyLoad. I attempted the code below but get a 404 for the bundle not found.
.state('test',
{
url: "/login",
templateUrl: "scripts/test.html",
resolve: {
plugins: ['$ocLazyLoad', function ($ocLazyLoad) {
console.log('oczload');
return $ocLazyLoad.load([
{ type: 'js', path: '~/bundles/essentialjs' }
]);
}]
}
})
The issue appears to be on this line:
{ type: 'js', path: '~/bundles/essentialjs' }