我试图在Kendo对话框中的组件中使用Kendoui Angular2网格。 当我试图点击 - 点击按下按钮时,它不起作用,我被“抛出”到主页。 有谁知道这是否应该以某种方式起作用?
代码:
<kendo-dialog *ngIf="isHelloOpen ">
<kendo-dialog-titlebar title="hello" (click)="isHelloOpen = false">
<h2 class="modal-title" id="myModalLabel">hello</h2>
</kendo-dialog-titlebar>
<hello-component *ngIf="currentPage == 1></hello-component>
<kendo-dialog-actions class="modal-footer">
<button type="button" class="btn" (click)="isHelloOpen = false">hello</button>
</div>
</kendo-dialog-actions>
</kendo-dialog>
网格在<hello-component>
内。
感谢,
答案 0 :(得分:1)
在本地测试时似乎有效。 Dialog将呈现自定义组件'hello-grid':
<kendo-dialog title="Action required" *ngIf="opened" (close)="close('cancel')">
<hello-grid></hello-grid>
<kendo-dialog-actions>
<button kendoButton (click)="close('yes')" primary="true">Yes</button>
<button kendoButton (click)="close('no')">No</button>
</kendo-dialog-actions>
</kendo-dialog>
这是'hello-grid'组件的模板:
<kendo-grid
[data]="gridView"
[pageSize]="pageSize"
[skip]="skip"
[pageable]="{
buttonCount: buttonCount,
info: info,
type: type,
pageSizes: pageSizes,
previousNext: previousNext
}"
[scrollable]="'none'"
(pageChange)="pageChange($event)"
>
</kendo-grid>
Runnable plunker: http://plnkr.co/edit/RyxR8ts2CRy229RXjXzF?p=preview
寻呼机工作正常。我错过了什么吗?