angular2 template - Create Dynamic Modal Angular 4 -
i have list of elements service, need send name , other properties modal onclick event every element, have code.
onclick of item, pass items information showdialog
method. in dialog display information passed follows:
<h2>{{this.profileselected}}</h2> <p (click)="showdialog(item)"></p>
in component create member variable profileselected store item clicked follows:
showdialog(item){ this.profileselected = item; this.display=true; }
Comments
Post a Comment