angularjs - angular component DOM add attribute key -


i'am looping on dom element of angular component ngfor

  <td>        <button class="dropdown-item" idgroup={{compte_ingroup}} href="#">        action      </button>   </td>  

my question know how add reference element create in loop. issue happen me ==> can't bind 'idgroup' since isn't known property of 'button'

please i'am doing wrong?

if have component template

<td> ... </td> 

you should provide property called idgroup, , when invoke component should this:

<app-mycomponent *ngfor="let myelement of elementslist" [idgroup]="myelement.idgroup"></app-movie> 

and in component definition:

@component({     ... }) export class mycomponent {   @input() idgroup: any;    ... } 

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 -