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

吉米

我正在尝试使用this做一个可排序的表我已经按照说明进行操作,看来我已经angular2-datatable/datatable正确安装了但是在运行时,它抱怨:

 GET http://localhost:4200/angular2-datatable/datatable 404 (Not Found)

它来自以下行:

import {DataTableDirectives} from 'angular2-datatable/datatable';

但是我检查了node_module软件包,我在angular2-datatable/datatable那里。因此,似乎在运行时中的角度看起来错误的路径。我该如何解决?

桑凯特

像这样-在您的systemjs.config.js中更新angular2-datatable-

// 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' },
};

看看是否有帮助。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

使用angular-cli在angular2中获取http:// localhost:4200 / null 404(未找到)

在 Angular 中获取 http://localhost:4200/[object%20Blob] 404(未找到)

Angular 8:POST http:// localhost:4200 / assets / data / students.json 404(未找到)

Angular2和节点js中的POST http:// localhost:4200 / addTask 404(未找到),但值已在控制台中打印

Angular2 - sa-datatable 仅第一次加载数据

GET http:// localhost:4200 / resource 404(未找到)

POST http:// localhost:4200 / contact / send 404(未找到)

Angular2 - PrimeNG dataTable rowexpansion 不展开

PrimeNG angular2 的 DataTable 分页多选问题

Angular ngx-datatable cellTemplate未加载

重新加载Angular子组件将用户带到localhost:4200

DataTable未加载SqlDataReader

无法从DataTable加载DatagridView

XHR错误(404未找到)正在加载http:// localhost:3000 / traceur

angular 应用程序适用于 http://localhost:4200,但我想要 https://localhost:44325

GET http://localhost:4200/src/app/ficheros/nacionalidades.json 404(未找到)

Angular DataTables:$(...)。DataTable不是函数

Angular Datatable无法使用数据

Angular Material Datatable不对来自Http请求的数据进行排序

表格的DataTable Ajax重新加载

Angular 2 + angular-in-memory-web-api区域GET http:// localhost:3000 / traceur 404(未找到)

Struts2 jQuery DataTable 1.10多维Http参数

Angular2 + PrimeNG-当基础数据更改时如何重置dataTable?

在 Angular 5 中将 localhost:4200 更改为 mysite:4200

Angular7中的CORS策略已阻止源'http:// localhost:4200'

“http://localhost:49540/api/create/ 的 HTTP 失败响应:404 未找到”Angular 11 POST 请求

GET http:// localhost:4200 / node_modules / zone.js / dist / zone.js 404(未找到)

C#-DataTable中的DataTable

Angular ngx-datatable不刷新