Angular 2 routing to a different page and calling a function while passing in a parameter -
what doing on table users clicks edit @ point id table row , need open edit user screen passing in userid "changeuser" function loads selected user.
i cannot work out how call function passing in parameter.
this code:
public oneditclicked(data: any): { let myid = (this.users[data.index].id); let name = this.users[data.index].first_name + ' ' + this.users[data.index].last_name ; alert(`you clicked edit id: ${myid}, name ${name}`); this.router.navigatebyurl('/manageuser', onchange(myid)); }
thanks andy
Comments
Post a Comment