I am using Angular 6 in my application.
After calling a Web Api I compose an Angular route Url, for example /module-name/component-name/par1Value/par2Value/par3Value.
I now want to show the component from the read route in a Material Dialog.
How can I accomplish it? Can I create the component from the Url, so that I can pass it to open method?
this.dialog.open(myCreatedComponent,
{
width: '900px',
height: '600px'
});
Or is there another way?
Thanks in advance.
Routerservice by injecting it into the code where you are handling the http call and once you have the url, usethis.router.navigate([path]);But I noticed that you are trying to open it in a dialog. This can be more difficult, but essentially you would want to map the possible paths you get back from the web api to the components you want to render.