Skip to content

undefined Output should show error in the parent template #43603

@urielzen

Description

@urielzen

Which @angular/* package(s) are relevant/releated to the feature request?

core

Description

I believe I have all the template strict checks enabled, and I was expecting to have a template error at my parent component telling me that my child component does not have certain output if there is a typo in its name.

@Component({
  selector: 'app-child',
  templateUrl: './child.component.html'
})
export class ChildComponent {
  @Output() outputFromChild = new EventEmitter<string>();
}
<app-child (outputFromChildWithATypo)="handleOutputAtParent($event)"></app-child>

Proposed solution

The compiler should warn about a non-existing output in the component element.

Alternatives considered

Please let me know if this error check already exists, I may just be missing enabling it. I tried googling for it but could not find anything relevant.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: compilerIssues related to `ngc`, Angular's template compilercompiler: template type-checkingfeatureLabel used to distinguish feature request from other issuesfeature: under considerationFeature request for which voting has completed and the request is now under consideration

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions