Installing the Bootstrap CSS framework
In this section, we will once again use the newest feature that's available in Angular CLI 6: the add command. Using this, we will add Bootstrap 4 to our application:
- Inside the
Clientfolder ofchapter-10, open your Terminal window and type the following command:
ng add @ng-bootstrap/schematics- The previous command will create and update the following files:
+ @ng-bootstrap/[email protected]
added 3 packages in 26.372s
Installed packages for tooling via npm.
UPDATE package.json (1589 bytes)
UPDATE src/app/app.module.ts (1516 bytes)
UPDATE angular.json (3706 bytes)- In the
package.jsonfile, we will add the following dependencies:
"@ng-bootstrap/schematics": "^2.0.0-alpha.1",
"@ng-bootstrap/ng-bootstrap": "^2.0.0-alpha.0",
"bootstrap": "^4.0.0"- In the
src/app/app.module.tsfile, we will add the following lines:
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
imports: [
...
NgbModule...