Skip to content

directiveGlobs are not working properly; #53

Open

Description

@wizardion

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>

Activity

  1. wizardion commented on Apr 23, 2021

    @wizardion
    Author

    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",
    ],
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions