Angular 2 load module in modal popup -
i using angular 2 bootstrap. have requirement - there dashboard page. once user clicks on link on dashboard page, new module shown on modal popup. how achieve this. application size big use angular lazy loading feature. in advance
i think question needs more details proper answer.
but have gathered want load modal content of module.
this easy achieve:
component dashboard
component b component shown on dashboard , has selector componentb
now define modal code in component b, if need data component use @input() in component b.
in component add component selector in html , use button/link other element, call modal window.
component html:
<a data-toggle="modal" data-target="#modalwindowname">ok</a> <componentb></componentb>
the above code trigger modal in component b name modalwindowname.
you can communicate componentb using input , output exchange values if needed.
Comments
Post a Comment