This project was generated with Angular CLI version 14.0.3.
Run ng serve
for a dev server. Navigate to http://localhost:4200/
. The application will automatically reload if you change any of the source files.
Run ng generate component component-name
to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module
.
Run ng build
to build the project. The build artifacts will be stored in the dist/
directory.
Run ng test
to execute the unit tests via Karma.
Run ng e2e
to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
To get more help on the Angular CLI use ng help
or go check out the Angular CLI Overview and Command Reference page.
- ng serve
- git init
- git add ./
- git config user.name ""
- git config user.email ""
- git commit -m "first commit"
- git branch -M main
- git remote add origin https://github.com/RamuDhanush/FirstAngularApp.git
- git push -u origin main
- ng build --output-path docs --base-href /repository-name/
- Once the build completes, we will find a new folder named docs and inside this folder found -> HTML file, a few JS files, and a few other files. This is the output of the build.
- git add ./
- git commit -m "Included docs folder and build files"
- git branch -M main
- git push -u origin main
- Go to corresponding GitHub repository, switch to the Settings tab
- Under "Code and automation", find "Pages" to configure the GitHub Pages in left side menus
- Fill the Source section
- Set main as the branch, choose /docs in the second dropdown, and click Save.
- We have successfully hosted our Angular app in GitHub Pages
- After a few minutes, reload the page. You will find that the message is changed from “Your site is ready to be published at…” to “Your site is published at…”
- Browse the https://username.github.io/repositoryname