This project was generated with Angular CLI version 11.2.8.
Run ng serve for a dev server. Navigate to http://localhost:4200/. The app 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. Use the --prod flag for a production build.
Run ng test to execute the unit tests via Karma.
Run ng e2e to execute the end-to-end tests via Protractor.
- To begin, add the
angular-cli-ghpagesbuilder.
ng add angular-cli-ghpages- If you’re deploying the project to a Github project page you’ll need to set the
baseHrefproperty as the repository name. ThebaseHrefwill be used for all relative URLs on your site. You could specify thebaseHrefas part of the project architect deploy options in theangular.jsonfile. Or just pass it as the--base-hrefflag to theng deploycommand. If you’re deploying the project to a Github user page, you do not need to set this option.
ng deploy --base-href=/<repository-name>/GitHub will automatically enable Pages when you push a gh-pages branch. There is no need to enable Pages from the repository settings.
ng deploy --base-href=/ng-dev-testing/- Source
- How to deploy a React, Angular and Vue project to Github pages
- Mocking Route params in Angular unit tests
- Testing Angular routing components with the RouterTestingModule
- Writing Angular Test Cases for Router, Service, ActivatedRoute
- Mock ActivatedRoute with params, data and snapshot
- An Introduction to Jasmine Unit Testing
- Overriding Components for Testing
To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.