angular - Can't bind to 'clrDgField' since it isn't a known property of 'clr-dg-cell' -


just started using vmware clarity - cool project! have followed samples on adding data grid , binding list of users, error:

can't bind 'clrdgfield' since isn't known property of 'clr-dg-cell'. 1. if 'clr-dg-cell' angular component , has 'clrdgfield' input, verify part of module.

html template looks this:

<clr-datagrid>    <clr-dg-column>first name</clr-dg-column>   <clr-dg-column>last name</clr-dg-column>   <clr-dg-column>email</clr-dg-column>   <clr-dg-column>capture date</clr-dg-column>    <clr-dg-row *clrdgitems="let user of users">     <clr-dg-cell [clrdgfield]="'firstname'">{{user.firstname}}</clr-dg-cell>     <clr-dg-cell [clrdgfield]="'lastname'">{{user.lastname}}</clr-dg-cell>     <clr-dg-cell [clrdgfield]="'email'">{{user.email}}</clr-dg-cell>     <clr-dg-cell [clrdgfield]="'createddate'">{{user.createddate | date}}</clr-dg-cell>   </clr-dg-row>    <clr-dg-footer>     {{pagination.firstitem + 1}} - {{pagination.lastitem + 1}}     of {{pagination.totalitems}} users     <clr-dg-pagination #pagination [clrdgpagesize]="50"></clr-dg-pagination>   </clr-dg-footer>  </clr-datagrid> 

component looks this:

import { component, oninit } '@angular/core'; import { user } '../types/user.type'; import { securityservice } '../services/security.service';  @component({   selector: 'app-maintain-users-component',   templateurl: './maintain.users.component.html' })  export class maintainuserscomponent implements oninit {    public users: user[];    constructor(private securityservice: securityservice) {   }    ngoninit(): void {     this.users = this.securityservice.getusers();   } } 

feature module looks this:

import { commonmodule } '@angular/common'; import { ngmodule } '@angular/core'; import { claritymodule } 'clarity-angular';  import { securityroutingmodule } './routing/security.routing.module';  import { maintainuserscomponent } './components/maintain.users.component';  import { securityservice } './services/security.service';  @ngmodule({   imports: [commonmodule, claritymodule, securityroutingmodule],    declarations: [maintainuserscomponent],    providers: [securityservice], })  export class securitymodule { } 

application module has this:

 imports: [       browsermodule,       httpclientmodule,       claritymodule.forroot(), 

not sure else add rid of error? thought have needed clarity module? thanks.

clrdgfield should go on clr-dg-column elements rather clr-dg-cell. can take @ example code here:

https://vmware.github.io/clarity/documentation/datagrid/binding-properties


Comments

Popular posts from this blog

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

php - How to remove letter in front of the word laravel -

minify - Minimizing css files -