Angular Modernizer
    Preparing search index...

    Function collectTemplateEdges

    • Collects the template edges of all non-test components of a project, one edge per host class, used class and kind of use, self edges omitted.

      Template edges are file-level dependencies that exist only in component templates: a host component uses a child component, an attribute directive or a pipe by selector or pipe name without importing its class (NgModule declarations). Build-impact and planning graphs add these edges next to the ES import edges.

      Parameters

      Returns TemplateEdge[]

      Resolution goes through DirectiveIndex: project classes only (library classes from .d.ts never yield an edge), *.spec.ts / *.test.ts classes are not indexed and their templates are skipped as hosts. Matching is project-wide, not per NgModule scope, so a selector declared by several classes yields an edge to each of them.

      collectTemplateEdges(project);
      // [{ from: '/src/app/list.component.ts', to: '/src/app/item.component.ts',
      // className: 'ItemComponent', hostClassName: 'ListComponent', via: 'component',
      // templateFile: '/src/app/list.component.html' }]