Angular Modernizer
    Preparing search index...

    Function findTemplateOwnerFiles

    • Finds the component source files that own an external template.

      Lookup order: components in the template's directory whose templateUrl resolves to it, then components anywhere in the project, then the .ts file with the same basename (x.component.html -> x.component.ts) as a fallback for decorators the options do not list. Returns absolute paths, empty when no owner is found. A template shared by several components yields several owners.

      Parameters

      Returns string[]

      findTemplateOwnerFiles(project, '/src/app/user/user.component.html');
      // ['/src/app/user/user.component.ts']