Open ZarinaChe opened 7 years ago
Can anyone suggest something?
You could do something like this to put the template into the Angular template cache directly:
angular
.module('template',[])
.run(['$templateCache', function($templateCache) {
var url = 'views/common/navigation.html';
$templateCache.put(url, require(url));
}]);
source: https://stackoverflow.com/questions/33436729/webpack-using-require-for-ng-include
I tried to replace raw loader with another loader but I coudn't adopt to my project.
$templateCache
is currently best solution for me.
Thanks!
I'm experiencing problems with
ng-include
directive in production. While in development it works because required template exists. And on production (after building project and running from dist) I get 404 when angular tries to load this template.Is this well known issue?