Error importing Ng-bootstrap Angular 2

I try to run ng-bootstrap for angular 2 and I get an error message to install ng-bootstrap. I believe this is a problem of the way. This 404 error occurs when trying to access the page and when npm starts. When angular ng-bootstrap tries to load, I get a 404 error in the import module:

[1] 16.08.20 20:01:00 404 GET /@ng-bootstrap/ng-bootstrap

But this module is inside node_modules. Thanks

+4
source share
4 answers

You must install the following command first

npm install --save @ng-bootstrap/ng-bootstrap

See https://ng-bootstrap.imtqy.com/#/getting-started

Follow this link, it has a link to the application module and system configuration and what it did wrong

.module.ts

import {NgbModule} from '@ng-bootstrap/ng-bootstrap';
and
imports:      [ NgbModule]

systemjs.config.js

**var map:** '@ng-bootstrap':          'node_modules/@ng-bootstrap'

**var packages:** '@ng-bootstrap/ng-bootstrap':       { main: 'index.js', defaultExtension: 'js' }
+5

, , ngBootstrap systemJS

0

I had the same problem that was solved with a few changes in systemjs.config.js Getting Started Angular2 RC5 with ng-bootstrap 404 Error

0
source

check out my angular 2 training project, i just made some demos with angular 2 and ng-bootstrap. https://github.com/beginor/learning-angular2

0
source

Source: https://habr.com/ru/post/1651912/


All Articles