Wenn du eine Fehlermeldung wie
error.txt
Error: src/app/my-component/my-component.component.html:2:1 - error NG8002: Can't bind to 'routerLink' since it isn't a known property of 'p-button'.
1. If 'p-button' is an Angular component and it has 'routerLink' input, then verify that it is part of this module.
2. If 'p-button' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component.in deiner Angular-App siehst, öffne die Moduldatei, die deine Komponente deklariert (typischerweise app.module.ts) und füge
app.module.ts
RouterModule,zu ihren imports hinzu, zum Beispiel:
app.module.ts
imports: [
CommonModule,
RouterModule,
]
Ähnliche Beiträge nach Kategorie:
Angular
Wenn dieser Beitrag dir geholfen hat, erwäge, mir einen Kaffee zu spendieren oder per PayPal zu spenden, um die Recherche und Veröffentlichung neuer Beiträge auf TechOverflow zu unterstützen