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

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -