小编Dav*_*iah的帖子

如何在带有SystemJs模块系统的Angular 4应用程序中使用ngx-bootstrap

我尝试了许多指定路径的变体,以允许SystemJS加载ngx-bootstrap包

    System.config({
    "defaultJSExtensions": true,
    "paths": {

        "@angular/core": "node_modules/@angular/core/bundles/core.umd.js",
        "@angular/forms": "node_modules/@angular/forms/bundles/forms.umd.js",
        "@angular/http": "node_modules/@angular/http/bundles/http.umd.js",
        ...
        "*": "node_modules/*",
        "ngx-bootstrap": "node_modules/ngx-bootstrap",
        "highcharts": "node_modules/highcharts/highcharts.js",
        "angular2-highcharts": "node_modules/angular2-highcharts/index.js"
    },
    "packages": {}
});
Run Code Online (Sandbox Code Playgroud)

但它仍然无法正常加载..

我在控制台中看到以下错误

"(SystemJS) XHR error (404 Not Found) loading http://localhost:5555/node_modules/ngx-bootstrap.js 

wrapFn@http://localhost:5555/node_modules/zone.js/dist/zone.js?1493823577322:1230:30 [<root>]       

Error loading http://localhost:5555/node_modules/ngx-bootstrap.js as "ngx-bootstrap" from http://localhost:5555/hc/app.module.js" 

"Not expecting this error? Report it at https://github.com/mgechev/angular-seed/issues"
Run Code Online (Sandbox Code Playgroud)

systemjs ngx-bootstrap angular

5
推荐指数
1
解决办法
2965
查看次数

标签 统计

angular ×1

ngx-bootstrap ×1

systemjs ×1