【问题标题】:will angular2 have the kendo spreadsheet?angular2 会有剑道电子表格吗?
【发布时间】:2017-01-26 16:24:46
【问题描述】:

在任何即将发布的版本中,angular2 是否会有 Kendo 电子表格或导出到 excel 的网格。我们希望在 angular2 中使用电子表格版本,因为我们使用的是 angular1 版本并且想要升级。这可能吗?

网格示例Click here

电子表格示例 https://demos.telerik.com/kendo-ui/spreadsheet/index

如果没有,有没有办法将电子表格合并到 angular2 应用程序中?

【问题讨论】:

  • 欢迎来到 SO。在 SO 上不鼓励对工具、库、教程的引用提出问题。请在其他渠道询问。

标签: angular kendo-ui telerik spreadsheet


【解决方案1】:

如果你想访问另一个脚本中的方法,你使用哪个角度版本并不重要。这就是你应该如何使用 angular2

<script src="js/jquery.min.js"></script>
<script src="js/jszip.min.js"></script>
<script src="js/kendo.all.min.js"></script>

在您的 index.html 中包含这些脚本,为了访问这些脚本,请使用 declare 并在您的 service 中创建一个 any 类型的 variable

import { Injectable } from '@angular/core';

declare graphs:any;
//graphs represents the scripts you have imported from index.html 

@Injectable()
export class GraphService {

  constructor() { }

  dosomethingWithgraphs(){
   graphs.methods()//accessing its methods
   graphs.properties//accessing its properties
  }
}

【讨论】:

    猜你喜欢
    • 2019-01-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-09-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多