Base solution for your next web application
Open Closed

routerLink navigation in generated action dropdown #5442


User avatar
0
kpmg created

Hello,

i generated crud operations with the asp.net zero tool for an entity. The modal dialog is to small for creating and editing my entity. So i decided to create a new component and navigate with a routerLink to it. The navigation works, but the opened dropdown stays in the dom of the page until a complete pagereload is done.

<a [routerLink]="exampleRoute" [queryParams]="exampleParams">
                 Do Something
</a>

as a workaround i added this the function

closeDropdown(event) {
        $(event.target).closest('.dropdown-menu').remove();
    }

and changed the link to:

<a (click)="closeDropdown($event)" [routerLink]="exampleRoute" [queryParams]="exampleParams">
                 Do Something
</a>

is this a bug or am i missing something in the routerlink?

thank you


7 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    There was a problem like this but we have fixed it, see <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/issues/430">https://github.com/aspnetzero/aspnet-ze ... issues/430</a>. Could you check if you have this code block in your project ?

  • User Avatar
    0
    kpmg created

    The link is broken

  • User Avatar
    0
    alper created
    Support Team

    <cite>ChristianW: </cite> The link is broken

    You need to be logged in to GitHub to be able to see the link.

  • User Avatar
    0
    kpmg created

    i am logged in

  • User Avatar
    0
    kpmg created

    Do i need to login to git with the same email address, as the account for this forum?

  • User Avatar
    0
    ismcagdas created
    Support Team

    It seems like you only added your github user "mregenscheit". If you want to use another GitHub user, you can add it on "Github Users" tab of LicenseManagement page.

  • User Avatar
    0
    kpmg created

    thank you,

    i e-mailed my development manager to add me to this list. when i have access i will have a look at the linked issue

    best regards