Skip to content

Commit 7aa47eb

Browse files
committed
fix(tabs): custom content not showing
1 parent a466ab2 commit 7aa47eb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

library/angular-admin-lte/src/lib/tabs/tabs.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export class TabContentComponent {
6060
template: '<ng-template #templateRef><ng-content></ng-content></ng-template>',
6161
changeDetection: ChangeDetectionStrategy.OnPush
6262
})
63-
export class TabComponent implements OnInit {
63+
export class TabComponent implements AfterContentInit {
6464
public index: number;
6565
public isActive = false;
6666

@@ -78,7 +78,7 @@ export class TabComponent implements OnInit {
7878
/**
7979
* @method ngOnInit
8080
*/
81-
ngOnInit() {
81+
ngAfterContentInit() {
8282
if (this.tabContentComponent) {
8383
this.contentTemplateRef = this.tabContentComponent.templateRef;
8484
} else {
@@ -127,7 +127,7 @@ export class TabsComponent implements AfterContentInit, AfterViewInit, OnChanges
127127
@Output() public closeTab = new EventEmitter();
128128
@Output() public openTab = new EventEmitter();
129129

130-
@ContentChild(TabsHeaderComponent, /* TODO: add static flag */ {}) public tabsHeaderComponent: TabsHeaderComponent;
130+
@ContentChild(TabsHeaderComponent, { static: true }) public tabsHeaderComponent: TabsHeaderComponent;
131131

132132
@ContentChildren(TabComponent) public tabs: QueryList<TabComponent>;
133133

0 commit comments

Comments
 (0)