pm-controls
Version:
ProModel Controls
40 lines (31 loc) • 893 B
text/typescript
import {
ChangeDetectorRef,
Component,
Input,
OnInit } from '@angular/core';
import { TabsComponent } from '../tabs/tabs-component';
({
selector: 'pm-tab',
//templateUrl: './app/controls/components/tab/tab.html',
templateUrl: './tab.html'
})
export class TabComponent implements OnInit {
constructor(private tabs: TabsComponent, private changeDetectorRef: ChangeDetectorRef) {}
() Name: string;
() Height: any;
private isSelected: boolean;
('IsSelected')
get IsSelected(): boolean {
return this.isSelected;
}
set IsSelected(value: boolean) {
this.isSelected = value;
this.changeDetectorRef.detectChanges();
}
ngOnInit() {
this.tabs.AddTab(this);
}
get TabHeaderHeight() {
return "calc(100% - " + this.tabs.TabHeaderHeight + "px)";
}
}