shlomiassaf / ngx-modialog

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

Possible to call custom components in .body section? #272

Closed agustincelentano closed 7 years ago

agustincelentano commented 7 years ago

Hi, it's only a question about functionality. Is possible to call custom components in the body section? Like this:

this.modal.alert() .size('lg') .showClose(true) .title('URLS AND MD5s') .body(`

        <b>Configuration:</b>
         <div  *ngFor="let url of urls">
            <p>{{url.url }}</p>
        </div>

        `)
        .open();

Should be working something like this?

Thanks in advance

shlomiassaf commented 7 years ago

Tracked in #277

dawar2151 commented 7 years ago

we can add selector component in body like this :

this.modal.alert()
            .size('lg')
            .showClose(true)
            .title('A simple Alert style modal window')
            .body('<app-orders></app-orders>')
            .open();

i get get WARNING: sanitizing HTML stripped some content (see http://g.co/ng/security#xss).

maximelafarie commented 7 years ago

Mentioned this error too in #321.