directive-restrict AE always not work in some case
.directive("snapContainer", [
"$injector", "$rootScope", "$rootElement", "$timeout", "ibRoutePathSaver",
/*jshint maxparams:5*/
function($injector, $rootScope, $rootElement, $timeout, ibRoutePathSaver) {
return {
restrict: "A",
directive-restrict AE always generate error triple error [angular/directive-restrict] Line:11 Column:2 Missing directive restriction [angular/directive-restrict] Line:11 Column:2 Missing directive restriction [angular/directive-restrict] Line:11 Column:2 Missing directive restriction
Hi, I've got the same problem. Given that my rule was defined as follow:
"angular/directive-restrict": [2, {
"explicit": "always"
}],
when I write the following code:
angular
.module('tuleap.pull-request')
.directive('overview', OverviewDirective);
function OverviewDirective() {
return {
restrict : 'A', // I also get the same error with 'AE'
scope : {},
templateUrl : 'overview/overview.tpl.html',
controller : 'OverviewController as overview',
bindToController: true
};
}
Then I will get an error (I only get one error though, not three as above):
<file-path-to-the-file>/overview-directive.js
1:1 error Missing directive restriction angular/directive-restrict
I should not have an error since 'A' is explicitly defined in the directive.
+1
+1
+1
+1
I can not reproduct the problem. I have added a unit test