Reputation: 23
Same for clr-column clr-row , even after importing ClarityModule approprietly
import { GestionFournisseursComponent } from './gestion-fournisseurs/gestion-fournisseurs.component';
import {ClarityModule} from '@clr/angular';
@NgModule({
declarations: [GestionFournisseursComponent],
imports: [
CommonModule,
ReferentielRoutingModule,
ClarityModule
]
})
export class ReferentielModule { }
HTMl:
<clr-datagrid></clr-datagrid>
Error:
Error: src/app/main/referentiel/gestion-fournisseurs/gestion-fournisseurs.component.html:2:1 - error NG8001: 'clr-datagrid' is not a known element:
2
src/app/main/referentiel/gestion-fournisseurs/gestion-fournisseurs.component.ts:6:16
6 templateUrl: './gestion-fournisseurs.component.html',
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error occurs in the template of component GestionFournisseursComponent.
I tried importing the ClarityDatagridModule only, reinstalled clarity , angular , dependencies but always the same error , any help will be appreciated .
Thanks in advance.
Upvotes: 1
Views: 1040
Reputation: 31
I had the same issue with Angular 12.2.17 and Clarity 12.0.7 After adding Clarity with the following command:
ng add @clr/[email protected]
At this point, I had the error. To fix it, I just used the command:
npm install @clr/ui --save
I got this command from the Clarity documentation https://clarity.design/documentation/get-started. This solved the error in my case.
Upvotes: 0