Are there common problems between rounting and mat-dialogs in Angular? [closed]












1















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!










share|improve this question













closed as off-topic by Tetsujin, n8te, grawity, Twisty Impersonator, music2myear Jan 17 at 19:38


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question is not about computer hardware or software, within the scope defined in the help center." – n8te, Twisty Impersonator, music2myear

If this question can be reworded to fit the rules in the help center, please edit the question.

















  • Please review the tag you've applied to this question. I believe it is not an appropriate tag for this question, and people looking for questions about Angular will not find this question based on that tag.

    – music2myear
    Jan 17 at 19:38
















1















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!










share|improve this question













closed as off-topic by Tetsujin, n8te, grawity, Twisty Impersonator, music2myear Jan 17 at 19:38


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question is not about computer hardware or software, within the scope defined in the help center." – n8te, Twisty Impersonator, music2myear

If this question can be reworded to fit the rules in the help center, please edit the question.

















  • Please review the tag you've applied to this question. I believe it is not an appropriate tag for this question, and people looking for questions about Angular will not find this question based on that tag.

    – music2myear
    Jan 17 at 19:38














1












1








1








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!










share|improve this question














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!







routing






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 17 at 9:34









jojo0701jojo0701

61




61




closed as off-topic by Tetsujin, n8te, grawity, Twisty Impersonator, music2myear Jan 17 at 19:38


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question is not about computer hardware or software, within the scope defined in the help center." – n8te, Twisty Impersonator, music2myear

If this question can be reworded to fit the rules in the help center, please edit the question.







closed as off-topic by Tetsujin, n8te, grawity, Twisty Impersonator, music2myear Jan 17 at 19:38


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "This question is not about computer hardware or software, within the scope defined in the help center." – n8te, Twisty Impersonator, music2myear

If this question can be reworded to fit the rules in the help center, please edit the question.













  • Please review the tag you've applied to this question. I believe it is not an appropriate tag for this question, and people looking for questions about Angular will not find this question based on that tag.

    – music2myear
    Jan 17 at 19:38



















  • Please review the tag you've applied to this question. I believe it is not an appropriate tag for this question, and people looking for questions about Angular will not find this question based on that tag.

    – music2myear
    Jan 17 at 19:38

















Please review the tag you've applied to this question. I believe it is not an appropriate tag for this question, and people looking for questions about Angular will not find this question based on that tag.

– music2myear
Jan 17 at 19:38





Please review the tag you've applied to this question. I believe it is not an appropriate tag for this question, and people looking for questions about Angular will not find this question based on that tag.

– music2myear
Jan 17 at 19:38










0






active

oldest

votes

















0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

Mangá

 ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕