【问题标题】:Importing multiple externan Javascript libraries导入多个外部 Javascript 库
【发布时间】:2015-06-17 16:28:13
【问题描述】:

我需要将多个 JS 文件导入 iPython Notebook。

这似乎可行,但对我来说似乎有点难看。

%%javascript
require.config({
  paths: {
      highcharts: 'http://localhost:3000/hicharts/js/highcharts'
  }
});
require.config({
  paths: {
      exporting: 'http://localhost:3000/hicharts/js/modules/exporting'
  }
});

我有点期待这会奏效:

%%javascript
require.config({
  paths: {
      highcharts: 'http://localhost:3000/hicharts/js/highcharts',
      exporting: 'http://localhost:3000/hicharts/js/modules/exporting'
  }
});

我在这里遗漏了什么吗,有人知道它的记录在哪里吗?我似乎找不到太多讨论它的内容。

【问题讨论】:

    标签: javascript highcharts ipython ipython-notebook


    【解决方案1】:

    你试过了吗

    %%javascript
    require.config({
      paths:[ 
        { highcharts: 'http://localhost:3000/hicharts/js/highcharts' },
        {  exporting: 'http://localhost:3000/hicharts/js/modules/exporting' }
    ]
    });
    

    我怀疑它需要一个对象数组,而不是字典。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-03-15
      • 2014-08-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多