File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -63,11 +63,9 @@ import {
6363 [ngStyle]="{'display': active ? null : 'none'}"
6464 [attr.aria-labelledby]="id + '-header'"
6565 aria-live="polite">
66- <ng-template *ngIf="isTemplate(tabContent); else projectedContent" [ngTemplateOutlet]="tabContent"></ng-template>
67- </div>
68- <ng-template #projectedContent>
66+ <ng-template *ngIf="isTemplate(tabContent)" [ngTemplateOutlet]="tabContent" [ngTemplateOutletContext]="{ $implicit: templateContext }"></ng-template>
6967 <ng-content></ng-content>
70- </ng-template >
68+ </div >
7169 `
7270} )
7371export class Tab implements OnInit {
@@ -114,14 +112,18 @@ export class Tab implements OnInit {
114112 @Input ( ) set cacheActive ( shouldCache : boolean ) {
115113 this . _cacheActive = shouldCache ;
116114 }
117-
115+ /**
116+ * Allows life cycle hooks to be called on the rendered content
117+ */
118118 @Input ( ) tabContent : TemplateRef < any > ;
119-
119+ /**
120+ * Optional data for templates passed as implicit context
121+ */
122+ @Input ( ) templateContext : any ;
120123 /**
121124 * Value 'selected' to be emitted after a new `Tab` is selected.
122125 */
123126 @Output ( ) selected : EventEmitter < void > = new EventEmitter < void > ( ) ;
124-
125127 /**
126128 * Used to set the id property on the element.
127129 */
You can’t perform that action at this time.
0 commit comments