/** * Created by Menna on 8/22/16. */ import { ElementRef, Input, Component, AfterViewInit, ViewChild, OnDestroy } from '@angular/core'; import { Grid } from './grid.widget' import GridOptions = kendo.ui.GridOptions; @Component({ selector: 'kendo_grid', template: `
`, styleUrls: ['./grid.style.css'] }) export class GridComponent implements AfterViewInit, OnDestroy { @Input() private options: GridOptions; @ViewChild('devRef') private element: ElementRef; private protoType: Grid; ngAfterViewInit() { this.protoType = new Grid(this.element.nativeElement, this.options); } get ProtoType(): Grid { return this.protoType; } set ProtoType(protoType: Grid) { this.protoType = protoType; } ngOnDestroy() { this.protoType.destroy(); } }