File

my-lib/tabs/tab-panel/tab-panel.ts

Metadata

encapsulation ViewEncapsulation.None
selector [tabPanel],tab-panel
templateUrl ./tab-panel.html

Index

Properties
Methods
Outputs
Accessors

Constructor

constructor()

Outputs

onActive $event type: EventEmitter<any>

Methods

setActive
setActive(val: )
Parameters :
Name Type Optional Description
val
Returns : void

Properties

_tabBarClass
_tabBarClass: Object
Type : Object
Default value : { [`${prefixCls}-pane-wrap`]: true, [`${prefixCls}-pane-wrap-active`]: true }
time
time: any
Type : any
Default value : new Date().getTime()
tpl
tpl: TemplateRef<any>
Type : TemplateRef<any>
Decorators : ViewChild

Accessors

tabBarClass
gettabBarClass()
import {
    Component, ViewEncapsulation,
    HostBinding, Input, TemplateRef,
    ViewChild, HostListener, EventEmitter, Output
} from '@angular/core';
import { Subject } from 'rxjs/Subject';
import { prefixCls } from '../var';
import { ansycClassObj } from 'meepo-utils';
import { TabsComponent } from '../tabs';
@Component({
    selector: '[tabPanel],tab-panel',
    templateUrl: './tab-panel.html',
    encapsulation: ViewEncapsulation.None
})
export class TabPanelComponent {
    @ViewChild('ref') tpl: TemplateRef<any>;
    _tabBarClass: Object = {
        [`${prefixCls}-pane-wrap`]: true,
        [`${prefixCls}-pane-wrap-active`]: true
    };
    @Output() onActive: EventEmitter<any> = new EventEmitter();
    time: any = new Date().getTime();
    get tabBarClass() {
        return ansycClassObj(this._tabBarClass);
    }

    constructor() { }

    setActive(val) {
        if (val) {
            this.onActive.emit(this);
        }
    }
}
<ng-template #ref let-index>
    <div [class]="tabBarClass">
        <ng-content></ng-content>
    </div>
</ng-template>
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""