如何将js转换为Content Explorer的Ts?

时间:2019-05-14 07:30:32

标签: angular typescript

content explorer error将js文件转换为ts文件,但仍然面临称为content-     exlporer undefined。如何在angular2中使用Content Explorer。

In js files javascript code 
    var hostURL = window.location.origin,
    baseURL = hostURL + window.location.pathname + "rest/";     
    var folderId, accessToken;
    var contentExplorer = new Box.ContentExplorer();
    var fileCollection = new Array();   

在ts文件中键入脚本代码

声明以下参数的所有变量,并将其添加到ngOninit中。

  this.hostURL = window.location.origin;
  this.baseURL = this.hostURL + window.location.pathname + "rest/";
  const { ContentExplorer } = this.Box;
  this. contentExplorer = new ContentExplorer();

0 个答案:

没有答案