我想在我的angular2應用中使用vaadin網格...按照這裏的文檔https://vaadin.com/download#elements我已經導入了webcomponents-lite.min.js,vaadin-grid.html和vaadin指令。示例http://plnkr.co/edit/B9216vP7kDlDkN44kriB?p=preview ...我沒有看到任何錯誤,我也沒有看到網格...有人可以告訴我我失蹤了嗎? 以下是HTML在angular2應用中使用Vaadin網格
<link rel="import" href="https://cdn.vaadin.com/vaadin-core-elements/latest/vaadin-grid/vaadin-grid.html">
<script src="http://polygit.org/polymer+:master/components/webcomponentsjs/webcomponents-lite.min.js"></script>
我import語句這是從文檔
import {Directive, ElementRef, Input, Output, EventEmitter} from '@angular/core';
const Polymer = (<any>window).Polymer;
@Directive({selector: 'vaadin-grid'})
export class VaadinGrid {
@Output('grid-ready') gridReady: EventEmitter<any> = new EventEmitter(false);
private grid: any;
constructor(el: ElementRef) {
if (!Polymer || !Polymer.isInstance(el.nativeElement)) {
console.error("vaadin-grid has not been registered yet, please remember to import vaadin-grid.html in your main HTML page.");
return;
}
this.grid = el.nativeElement;
}
ngAfterViewInit() {
// Configuration <table> might be placed in a wrong container.
// Let's move it in the light dom programmatically to fix that.
var localDomTable = this.grid.querySelector("table:not(.vaadin-grid)");
if (localDomTable) {
Polymer.dom(this.grid).appendChild(localDomTable);
}
this.grid.then(() => {
this.gridReady.emit(this.grid);
});
}
}
的指令是有一些東西,我需要增加更多的製造vaadin電網的工作在我angular2應用程序?有人請幫我
謝謝@yurzui ... –