Skip to content

Commit 8068267

Browse files
committed
fix(tabs): tempfix for active tabs with cNavLink
1 parent 470cdc1 commit 8068267

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Diff for: src/app/views/base/tabs/tabs.component.html

+10-10
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,25 @@
1010
<c-card-body>
1111
<c-nav variant="tabs">
1212
<c-nav-item>
13-
<a [active]="true" [cTabContent]="tabContent1" routerLink="./" [tabPaneIdx]="0" cNavLink>
13+
<a [cTabContent]="tabContent1" [routerLink] [tabPaneIdx]="0" cNavLink>
1414
<svg cIcon class="me-2" name="cilHome"></svg>
1515
Home
1616
</a>
1717
</c-nav-item>
1818
<c-nav-item>
19-
<a [cTabContent]="tabContent1" routerLink="./" [tabPaneIdx]="1" cNavLink>
19+
<a [cTabContent]="tabContent1" [routerLink] [tabPaneIdx]="1" cNavLink>
2020
<svg cIcon class="me-2" name="cilUser"></svg>
2121
Profile
2222
</a>
2323
</c-nav-item>
2424
<c-nav-item>
25-
<a [cTabContent]="tabContent1" routerLink="./" [tabPaneIdx]="2" cNavLink>
25+
<a [cTabContent]="tabContent1" [routerLink] [tabPaneIdx]="2" cNavLink>
2626
<svg cIcon class="me-2" name="cilCode"></svg>
2727
Contact
2828
</a>
2929
</c-nav-item>
3030
</c-nav>
31-
<c-tab-content #tabContent1="cTabContent" [activeTabPaneIdx]="1" cRounded="bottom">
31+
<c-tab-content #tabContent1="cTabContent" [activeTabPaneIdx]="0" cRounded="bottom">
3232
<c-tab-pane class="p-3 preview" role="tabpanel">
3333
This is some placeholder content the <strong>Home</strong> tab's associated content. Clicking another tab
3434
will toggle the visibility of this one for the next. The tab JavaScript swaps classes to control the
@@ -55,14 +55,14 @@
5555
<c-card-body>
5656
<c-nav variant="tabs">
5757
<c-nav-item *ngFor="let nav of panes; index as i; first as isFirst; last as isLast">
58-
<a [active]="isFirst" [cTabContent]="tabContent2" [disabled]="isLast" routerLink="./" [tabPaneIdx]="i"
58+
<a [cTabContent]="tabContent2" [disabled]="isLast" [routerLink] [tabPaneIdx]="i"
5959
cNavLink>
6060
<svg cIcon class="me-2" name="cilHome"></svg>
6161
{{nav.name}}
6262
</a>
6363
</c-nav-item>
6464
</c-nav>
65-
<c-tab-content #tabContent2="cTabContent" [activeTabPaneIdx]="1" cRounded="bottom">
65+
<c-tab-content #tabContent2="cTabContent" [activeTabPaneIdx]="0" cRounded="bottom">
6666
<c-tab-pane *ngFor="let pane of panes; index as i;" class="p-3 preview">
6767
This is some placeholder content the <strong>{{pane.name}}</strong> tab's associated content. Clicking
6868
another tab will toggle the visibility of this one for the next. The tab JavaScript swaps classes to
@@ -81,25 +81,25 @@
8181
<c-card-body>
8282
<c-nav variant="pills">
8383
<c-nav-item>
84-
<a [cTabContent]="tabContent3" routerLink="./" [tabPaneIdx]="0" cNavLink>
84+
<a [cTabContent]="tabContent3" [routerLink] [tabPaneIdx]="0" cNavLink>
8585
<svg cIcon class="me-2" name="cilHome"></svg>
8686
Home
8787
</a>
8888
</c-nav-item>
8989
<c-nav-item>
90-
<a [cTabContent]="tabContent3" routerLink="./" [tabPaneIdx]="1" cNavLink>
90+
<a [cTabContent]="tabContent3" [routerLink] [tabPaneIdx]="1" cNavLink>
9191
<svg cIcon class="me-2" name="cilUser"></svg>
9292
Profile
9393
</a>
9494
</c-nav-item>
9595
<c-nav-item>
96-
<a [active]="true" [cTabContent]="tabContent3" routerLink="./" [tabPaneIdx]="2" cNavLink>
96+
<a [cTabContent]="tabContent3" [routerLink] [tabPaneIdx]="2" cNavLink>
9797
<svg cIcon class="me-2" name="cilCode"></svg>
9898
Contact
9999
</a>
100100
</c-nav-item>
101101
</c-nav>
102-
<c-tab-content #tabContent3="cTabContent" cRounded="bottom">
102+
<c-tab-content #tabContent3="cTabContent" cRounded="bottom" [activeTabPaneIdx]="0">
103103
<c-tab-pane aria-labelledby="docs-code-preview" class="p-3 preview" role="tabpanel">
104104
This is some placeholder content the <strong>Home</strong> tab's associated content. Clicking another tab
105105
will toggle the visibility of this one for the next. The tab JavaScript swaps classes to control the

0 commit comments

Comments
 (0)