Skip to content

Latest commit

 

History

History
66 lines (49 loc) · 1.65 KB

README.md

File metadata and controls

66 lines (49 loc) · 1.65 KB

Angular CLI 7 + Angular 7 + Swagger-UI + Bootstrap 4.1 + FontAwesome 5 example app

This project was generated with Angular CLI version 7.3.4.

Start the project

Run npm install and ng serve. Server will start at port 4200. Go to localhost:4200.

How the project was created

Here are the commands and the steps that were used to create this project

Angular CLI commands

# Create a new Angular project with Angular CLI
$ ng new swagger --directory swagger-ui-angular6 --routing true --skip-tests true --inline-style true --style=css

# Add the needed dependencies
$ npm install @fortawesome/[email protected]
$ npm install [email protected]
$ npm install [email protected]
$ npm install [email protected]
$ npm install @ng-bootstrap/[email protected]
$ npm install [email protected]
$ npm install [email protected]
$ npm install [email protected]

# Create a new Swagger component
$ ng generate component swagger --spec false --module app --export true --inline-style true

Configuration

In angular.json file add :

"styles": [
  "node_modules/bootstrap/dist/css/bootstrap.css",
  "node_modules/swagger-ui/dist/swagger-ui.css",
  "node_modules/@fortawesome/fontawesome-free/css/all.css",
  "src/jumbotron.css",
  {
    "input": "src/styles.css"
  }
],
"scripts": [
  "node_modules/jquery/dist/jquery.slim.js",
  "node_modules/popper.js/dist/umd/popper.js",
  "node_modules/bootstrap/dist/js/bootstrap.js"
]

In app.module.ts add NG Bootstrap

import { NgbModule } from '@ng-bootstrap/ng-bootstrap';

  imports: [
    NgbModule.forRoot()
  ],

References