Reputation: 3657
I'm using PhpStorm with Angular. If I declare directive like this:
angular.module('myDir', [])
.directive('myDir', [function () {
return {
restrict: 'E',
link: function (scope, elm, attrs, controller) {
}
}
}]);
PhpStorm regonizes that HTML tag and works great (ex. ctrl+lmb=go to declaration).
But when I switch to that code (which is preferred by https://github.com/johnpapa/angularjs-styleguide) PhpStorm gives me unknown HTML tag message.
angular.module('myDir', [])
.directive('myDir', myDir);
function myDir() {
return {
restrict: 'E',
link: function (scope, elm, attrs, controller) {
}
}
}
Is there a way to fix it?
Upvotes: 0
Views: 66
Reputation: 165108
https://youtrack.jetbrains.com/issue/WEB-14092 -- accordingly to the status this issue has been fixed.
Fix will be in available next PhpStorm version -- must be build #140.1763 or newer (quite likely it will be PhpStorm v9).
Upvotes: 1