0

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/sale/viewer', id]);
}

When you are navigated to the sale 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?

6
  • 2
    you are using angular 1 event binding syntax Commented Aug 8, 2018 at 14:16
  • Are you implying that I should be using another event binding syntax? @Chellappan Commented Aug 8, 2018 at 14:17
  • in angular 5 for event binding is different syntax (click)="toggle()" Commented Aug 8, 2018 at 14:18
  • stackoverflow.com/questions/51249090/… Commented Aug 8, 2018 at 14:21
  • still can't get it working Commented Aug 8, 2018 at 15:11

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.