(404未找到)正在加载http://localhost:4200/angular2-数据表

(404未找到)正在加载http://localhost:4200/angular2-数据表,angular,datatable,Angular,Datatable,我正在尝试使用创建一个可排序的表。我已经按照说明进行了操作,似乎已正确安装了angular2数据表/datatable。 但在运行时,它抱怨: GET http://localhost:4200/angular2-datatable/datatable 404 (Not Found) 这句话的意思是: import {DataTableDirectives} from 'angular2-datatable/datatable'; 但是我检查了节点u模块包,我在那里有angular2数据表

我正在尝试使用创建一个可排序的表。我已经按照说明进行了操作,似乎已正确安装了
angular2数据表/datatable
。 但在运行时,它抱怨:

 GET http://localhost:4200/angular2-datatable/datatable 404 (Not Found)
这句话的意思是:

import {DataTableDirectives} from 'angular2-datatable/datatable';
但是我检查了节点u模块包,我在那里有
angular2数据表/datatable
。 因此,运行时的angular看起来走错了方向。
如何修复它?

systemjs.config.js中更新angular2数据表-

// map tells the System loader where to look for things
var map = {
    'src':                        'build', // 'dist',
    'rxjs':                       'node_modules/rxjs',
    '@angular':                   'node_modules/@angular',
    'angular2-datatable':         'node_modules/angular2-datatable',
    'lodash':                     'node_modules/lodash/lodash.js',
};

// packages tells the System loader how to load when no filename and/or no extension
var packages = {
    'src':                        { main: 'main.js',  defaultExtension: 'js' },
    'rxjs':                       { defaultExtension: 'js' },
    'angular2-datatable':         { defaultExtension: 'js' },
    'lodash':                     { defaultExtension: 'js' },
};

看看这是否有帮助。

这是@Salman的解决方案。我也犯了同样的错误。通过在systemjs.config中包含以下数据,我能够解决这个问题。