1 |
61381
|
k.triantaf
|
/**
|
2 |
|
|
* A single tab page. It renders the passed template
|
3 |
|
|
* via the @Input properties by using the ngTemplateOutlet
|
4 |
|
|
* and ngTemplateOutletContext directives.
|
5 |
|
|
*/
|
6 |
|
|
|
7 |
|
|
import { Component, Input } from '@angular/core';
|
8 |
|
|
|
9 |
|
|
@Component({
|
10 |
|
|
selector: 'my-tab',
|
11 |
|
|
// styles: [
|
12 |
|
|
// `
|
13 |
|
|
// .pane{
|
14 |
|
|
// padding: 1em;
|
15 |
|
|
// }
|
16 |
|
|
// `
|
17 |
|
|
// ],
|
18 |
|
|
template: `
|
19 |
|
|
<!-- [class]="active ? 'uk-active' : ''" [hidden]="!active"-->
|
20 |
|
|
<!-- <div [class]="active ? 'uk-active' : ''" [hidden]="!active">-->
|
21 |
|
|
<div class="pane">
|
22 |
|
|
<ng-content></ng-content>
|
23 |
|
|
</div>
|
24 |
|
|
|
25 |
|
|
<!-- <div [hidden]="!active" class="pane">-->
|
26 |
|
|
<!-- <ng-content></ng-content>-->
|
27 |
|
|
<!-- </div>-->
|
28 |
|
|
`
|
29 |
|
|
})
|
30 |
|
|
export class TabComponent {
|
31 |
|
|
@Input('tabTitle') title: string;
|
32 |
|
|
@Input('tabNumber') num: number;
|
33 |
|
|
@Input('customClass') customClass:string = "";
|
34 |
|
|
@Input('tabId') tabId: string;
|
35 |
|
|
}
|