Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 792
Renan Da Silva Barbosa Avatar asked Aug 21 '16 00:08

Renan Da Silva Barbosa


1 Answers

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' }
like image 149
iMalek Avatar answered Oct 20 '22 23:10

iMalek