This project was generated with Angular CLI version 7.3.4.
Run npm install
and ng serve
. Server will start at port 4200. Go to localhost:4200.
Here are the commands and the steps that were used to create this project
# 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
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()
],