(404 Not Found)angular2-datatable

时间:2017-06-18 12:29:19

标签: angular typescript datatable

我搜索了很多想要解决这个问题的答案,但仍然行不通:

我的控制台输出显示找不到angular2-datatalbe:

  

404 GET / angular2-datatable

我的systemjs.config:

-

map: {
  'lodash': 'npm:lodash/lodash.js',
  'angular2-datatable':'npm:angular2-datatable'
},
packages: {
  app: {
    main: './main.js',
    defaultExtension: 'js'
  },
  rxjs: {
    defaultExtension: 'js'
  }, 'lodash': {
    defaultExtension: 'js'
  },
  'angular2-datatable': {
    main: './index.js',
    defaultExtension: 'js'
  }
}

如何解决此问题?

2 个答案:

答案 0 :(得分:0)

替换此代码块:

自:

'angular2-datatable': {
    main: './index.js',
    defaultExtension: 'js'
}

要:

'angular2-datatable': {
    main: 'index.js',
    defaultExtension: 'js'
}

答案 1 :(得分:0)

你能试试吗

  map: {
 'lodash': 'npm:lodash/lodash.js',
     'angular2-datatable': 'npm:angular2-datatable/index.js',
    }, 

另外

'angular2-datatable': {

    defaultExtension: 'js'
}