This project was generated with Angular CLI version 7.3.5.
https://naveendb92.github.io/star-wars/#/planet
This application is built using Angular 7, Angular-Material, SCSS, Bootstrap 4.
- Color Palette used: https://colorhunt.co/palette/144191
- Data Fetch API: https://swapi.co/api/planets/
- ng new star-wars --style=scss
- npm install --save bootstrap jquery popper.js
- ng g component components/dashboard
(component creation: creates dashboard component inside components folder)
- npm install --save @angular/material @angular/cdk @angular/animations
- npm install --save hammerjs
- ng generate service services/data
- ng generate service services/count
(contains a variable which is a subjectBehavior and made as observable so that the changes to the variable can be observed/monitored from anywhere in the application)
- npm install --save font-awesome_
Run ng serve
and navigate to http://localhost:4200/
. Or run ng serve --open
which automatically open the browser and runs the application. Also the app will automcatically detect if any changes and reloads the application.
- Run the command
ng build --prod --output-path docs --base-href /<project_name>/
which createsdocs
folder in your applicaion root path. - Inside docs folder, copy
index.html
and paste in the same folder (docs) and rename it to404.html
. - Commit all the changes and push the code to GitHub.
- Go to GitHub -> Your Application -> Settings (top right corner) -> scroll down and find
GitHub Pages
. ↓ - From the
Source
dropdown, selectmaster branch/docs folder
. - It creates a application link.
"ng build --prod"
To get more help on the Angular CLI use ng help
or go check out the Angular CLI README.