Angular Modernizer
    Preparing search index...

    Finds usages of a symbol inside Angular component templates.

    Project-level companion to scanTemplate: resolves what a symbol means in Angular templates (component/directive selector, pipe name, class member, input/output binding) and scans every component template (external templateUrl files and inline template: literals).

    Member hits are verified when they read the member from the component context (foo, this.foo) inside the template of the declaring class or one of its subclasses. Same-name reads elsewhere (other components, or x.foo) are reported as template-unverified: they may or may not refer to the searched member.

    const finder = new TemplateUsageFinder(project);
    const usages = finder.findTemplateUsages('UserCardComponent', declarations);
    // [{ file: '/src/app/list.component.html', usageType: 'template', templateKind: 'element', ... }]
    Index

    Constructors

    Methods

    Constructors

    Methods

    • Finds template usages of the declarations named symbol.

      Parameters

      • symbol: string

        Searched name (class, member, or pipe class name).

      • declarations: Node<Node>[]

        Declaration nodes named symbol (as found by UsageFinder).

      Returns TemplateSymbolUsage[]

      Template usages, unsorted.