In angular 2, Pass obects with lot of proprities to forms (pop up) by double clicking datagrid -
there data-table/grid. when double clicked on 1 data row there, need pass relevant data item form. selected item (object) has lots of attributes.
what best way done without assigning values of attributes of selected item 1 one?
html code :
<data-table [items]="items" [itemcount]="itemcount" indexcolumnvisible (reload)="reloaditems($event)" (rowclick)="rowclick($event)" (rowdoubleclick)="opendetailsvatcodemodel(newvatcodemodal)" (rowdoubleclick)="rowdoubleclick($event)" [rowtooltip]="rowtooltip"> rowdoubleclick(rowevent) { this.editvatdetails = rowevent.row.item; //here need pass item form called "newvatcodeform" }
you can use [routerlink] pass objects id element , onclick new component in fetch data , fill out form:
<button [routerlink]="['/user', user.id]"> <md-icon>create</md-icon> </button>
Comments
Post a Comment