Answer the question
In order to leave comments, you need to log in
Problem with templateUrl in minification directive, who faced it?
I'm used to creating directives in three files. In one html, in the other lies the body of the directive itself, and in the third the controller.
It looks something like this:
mydirective.html:
<my-dir ng-controller="MyDirCtrl">Тут остальной хтмл<myDir>
app.directive('myDir', function() {
return {
restrict: 'AE',
templateUrl: 'templates/mydirective.html',
// тут остальной js
}
});
app.controller('MyDirCtrl', [ '$scope', function($scope) {
//тут остальной js
}]);
Answer the question
In order to leave comments, you need to log in
Everything, I figured everything out. It turned out that the problem was not entirely in the minifier. It compressed links with in templateUrl in directives normally. I had the following thing in my controller:
After minification, there is no such link in current.templateUrl anymore.
naturally the url in templateUrl has disappeared
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question