First goto your project directory and follow the below given steps.
- npm install --save @ng-bootstrap/ng-bootstrap
(run this command in node js command prompt)
2)npm install bootstrap@4.0.0-alpha.6
(next run this)
3)import {NgbModule} from '@ng-bootstrap/ng-bootstrap'
(write this in app module.ts) - If Module is your root module include this
@NgModule({ declarations: [AppComponent, ...], imports: [NgbModule.forRoot(), ...], bootstrap: [AppComponent]})
(or)
If not root Module
@NgModule({ declarations: [OtherComponent, ...], imports: [NgbModule, ...]})
Write this in system.config.js
map: {'@ng-bootstrap/ng-bootstrap': 'node_modules/@ng-bootstrap/ng-bootstrap/bundles/ng-bootstrap.js',}
Add in Index.html
<script src="../node_modules/jquery/dist/jquery.min.js"></script> <script src="../node_modules/bootstrap/dist/js/bootstrap.min.js"></script> <link rel="stylesheet" type="text/css" href="../node_modules/bootstrap/dist/css/bootstrap.min.css" />