Ng-bootstrap Import Error Angular 2

I try to run ng-bootstrap for angular 2 and I receive an error to install ng-bootstrap. I believe that is a path problem. This 404 error occur when i try to access page, and on start npm. When angular ng-bootstrap try to load I receive a 404 error on import module:

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

But this module is inside node_modules. Thanks

Upvotes: 6

Views: 12885

Answers (4)

zhimin
zhimin

Reputation: 3050

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

Upvotes: 0

Nelson
Nelson

Reputation: 424

I had the same issue, solved with a few changes to the systemjs.config.js Getting started Angular2 RC5 with ng-bootstrap 404 Error

Upvotes: 0

iMalek
iMalek

Reputation: 189

First you should install using below command

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

Refer https://ng-bootstrap.github.io/#/getting-started

Follow this issue link, it has app module and system config reference and what he did wrong

in your app.module.ts

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

in systemjs.config.js

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

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

Upvotes: 8

Nate
Nate

Reputation: 7876

You should look at this issue, it provides a good insight on how to configure ngBootstrap with systemJS

Upvotes: 0

Related Questions