shlomiassaf / ngx-modialog

Modal / Dialog for Angular
http://shlomiassaf.github.io/ngx-modialog
MIT License
686 stars 242 forks source link

Adding feature for passing arg as an variable to html body #328

Open yershalom opened 7 years ago

yershalom commented 7 years ago

I'm adding my plnkr example here.

http://plnkr.co/edit/O478lPqMuwnKbYc3SxHf?p=preview

I have added an arg for onClick method. When I want to see the arg in the modal it return the template. For example: instead of onClick() i want to pass onClick('shalom') and than in the template (body) i'm adding {{name}} and all I get is {{name}}.

My Plnkr example is much better...

laura2489 commented 7 years ago

I managed to do it by using this code:

.body(`<h4> Please tell us why you are closing your connection with ` 
       + this.fbProfile.firstName + `? </h4> `)
                .okBtn('Close Connection')