ngComponentUtility
ngComponentUtility copied to clipboard
directiveGlobs are not working properly;
Directives are not being cached entirely in my project. Within my project, I have this type of directive implementation:
File format names: app/modules/path/to/file-name-directive.js
Type of implementation:
angular.module('module.name')
.directive('nameOfDirective', nameOfDirective);
function nameOfDirective() {
return {
restrict: 'EA',
scope: {
item: '=',
},
templateUrl: 'path/to/file/test.html',
controller: TestDirectiveController
};
}
function TestDirectiveController($scope) {
...
}
ngComponents settings:
"ngComponents.directiveGlobs": [
"app/modules/**/*directive.js",
"app/**/*directive.js",
],
In this case, all the directive files with that implementations are not being cached and are not loaded by ngComponentUtility.
And 'Go-To Definition' doesn't work when I click on this directive: <name-of-directive item="test"></name-of-directive>
In addition, with components, it is working as expected:
File format names: app/modules/path/to/file-name-component.js
Type of implementation:
angular.module('module.name')
.component('nameOfComponent', {
templateUrl: 'path/to/file/test.html,
controller: TestController,
controllerAs: 'vm',
bindings: {
item: '=',
}
});
function TestController($scope) {
...
}
ngComponents settings:
"ngComponents.componentGlobs":[
"app/modules/**/*component.js",
],