Se você vê uma mensagem de erro como
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.em sua aplicação angular, abra o arquivo de módulo que está declarando seu componente(tipicamente app.module.ts) e adicione
app.module.ts
RouterModule,aos seus imports, por exemplo:
app.module.ts
imports: [
CommonModule,
RouterModule,
]
Check out similar posts by category:
Angular
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow