shlomiassaf / ngx-modialog

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

How to redirect after clicking "OK" button? #361

Closed jdushi closed 7 years ago

jdushi commented 7 years ago

this.modal.alert() .size('lg') .showClose(true) .title('A simple Alert style modal window') .body(Alert is a classic (title/body/footer) 1 button modal window that does not block.) .okBtnClass('btn btn-default') .open() .then(function () { this.router.navigate(['welcome']); }.bind(this));

I tried with a promise but the modal is not shown

qwe852147 commented 7 years ago

body will be string and you can reference #352 to do calling function

jdushi commented 7 years ago

@qwe852147 I did not found a solution, so I used another modal component. Thank you for your response. It might be useful to others.