Base solution for your next web application
Open Closed

Button doesn't disappear when clicked #5488


User avatar
0
system15 created

Hi there I have a dropdown button that doesn't disappear when clicked and navigated to a new page. I'm using asp.net zero with a angular5 frontend and bootstrap 4.

Here is the code:

some.component.html

<div class="btn-group dropdown" normalizePosition ng-click="toggle()">
<button class="dropdown-toggle btn btn-sm btn-primary"
        data-toggle="dropdown"
        aria-haspopup="true"
        aria-expanded="false">
    <i class="fa fa-cog"></i><span class="caret"></span> {{l("Edit")}}
</button>
<ul class="dropdown-menu">
    <li>
        <a (click)="openReport(id)">{{l('Run Report')}}</a>
    </li>
</ul>

some.component.ts

openReport(id): void {
    this.router.navigate(['/app/main/report/viewer', id]);
}

When you are navigated to the report viewer page in the browser the button is still showing and I'm not sure how to remove this after it's been clicked. Does anyone have ideas?


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

    Your problem seems similar to <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 the offered solution ?

  • User Avatar
    0
    system15 created

    Hi there the link provided doesn't work.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Please login to GitHub with your GitHub user "koooops" and try again.

    Thanks,