bug(routing): forget to put components in declaration #36360
Labels
area: core
Issues related to the framework runtime
area: router
core: directive matching
core: NgModule
freq2: medium
hotlist: error messages
P4
A relatively minor issue that is not relevant to core functions
state: confirmed
type: bug/fix
type: confusing
Milestone
馃悶 bug report
Affected Package
The issue is caused by package @angular/routerIs this a regression?
Yes, the previous version in which this bug was not present was: no ideaDescription
Suppose you forget to declare ChildComponent in declaration of parent.module.ts and will try to use *ngFor you will get this error : Can't bind to 'ngForOf' since it isn't a known property of 'p'. Basically i forget to declare ChildComponent in parent.module.ts. Still i am able to visit /parent/children and see content.
Expected: It should throw an error that ChildComponent is not a part of any module declaration.
Issue: Sometime it is really hard to debug for newbie what went wrong.
code :
馃敩 Minimal Reproduction
https://ng-run.com/edit/wiaLgud669oJ3gX4hMFP?open=app%2Fparent%2Fparent.component.html
馃敟 Exception or Error
馃實 Your Environment
Angular Version:
Anything else relevant?
The text was updated successfully, but these errors were encountered: