I am trying to migrate from angular js to angular 6.In angular js i have code
<a data-target="#Test" data-toggle="tab">Test</a></li>
<div class="tab-pane active" id="Test">
There are 4 such tabs and in angular 6 i have the code:
<li class="active"><a href="#Test" [ngClass]="{ 'active':activeTab==='Test'}" (click)="Test('Test')" data-toggle="tab">Test</a></li>
<div class="tab-pane active" id="Test" [ngClass]="{ 'active':activeTab==='Test'}">
//component.ts
activeTab = 'Test';
Test(activeTab){
this.activeTab = activeTab;
}
I am referring to Change active bootstrap tab inside angular component but I am getting error Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'Test' Error: Cannot match any routes. URL Segment: 'Test'.
I dont understand what is going wrong, routes should not be needed for tabs. Thanks in advance