Hello! 

What I wanted to do was to open a mat-dialog by clicking on an icon. This 
mat-dialog is a split panel that has to the left side buttons that can be 
clicked and to the right side a content space where other components are 
supposed to be loaded on click on the specific button. Now, I followed the 
guidelines of the original documentation for routing on 
https://angular.io/guide/router , but when I clicked the first icon to open 
the dialog, it's style was changed and it didn't open in form of a dialog 
anymore. Now I figured I could just keep the dialog style by changing the 
url within the method of calling the dialog like this


dialogRef.afterOpened().subscribe(result => {
      this.router.navigate(['/dialog']);
    });
   dialogRef.afterClosed().subscribe(result => {
     this.router.navigate(['']);
    });


Like this the url changed with opening anf closing the dialog the way I 
wanted. But I've got another routing-module with another component, which 
is working perfectly fine, before opening the dialog,but does not work 
anymore afterwards. And now the loading of the component via routing and 
using 'router-outlet' in the html tag does not work either. Now, my 
question is if there are some general problems with mat-dialog and routing 
that I might solve by using a different way? 

Is it necassary to code a custom dialog (not using mat-dialog)? 

I had everything working fine before with a service, though I thought 
changing the url and opening the components by navigation would be a lot 
less code and a nicer solution.

Hopefully, someone can explain this problem to me and what is actually 
happening. I might provide more general code, but like I said I pretty much 
followed the official documentation. Thanks in advance!

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to