railsstudent / ng-rxjs-30

Repeat JavaScript 30 in Angular and RxJS

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NgRxjs30

This project repeats Wes Bos's JavaScript 30 challenges (https://github.com/wesbos/JavaScript30) in Angular and RxJS.

Challenges:

Development server

Run ng serve --project=<project name> for a dev server. Navigate to http://localhost:4200/. The application will automatically reload if you change any of the source files.

Build

  • Check out gh-pages branch
  • Run ./build-doc.sh <project name> to build the project. The build artifacts will be stored in the dist/ directory.
  • git commit and push gh-pages branch to deploy the project to github page

Generate module in projects

 - change to project directory
ng g m src/app/<module name> --project=<project name> --module=src/app/app.module

Generate component in a feature module of projects

 - change to project directory
 ng g c src/app/<feature module>/<component name> --change-detection=OnPush --project=<project name> --module=src/app/<feature module>.module 

Generate directive in a feature module of projects

 - change to project directory
 ng g c src/app/<feature module>/<component name> --change-detection=OnPush --project=<project name> --module=src/app/<feature module>.module 

Build project in docs folder

./build-doc.sh  <project name>

Deploy to Github page

 - switch to gh-pages branch
 - merge main to gh-pages branch
 - update angular.json to add baseHref property 
 - copy index.html to 404.html
ng build --project=<project folder> --output-path docs/<project folder>
git add .
git push

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.

About

Repeat JavaScript 30 in Angular and RxJS

License:MIT License


Languages

Language:TypeScript 82.5%Language:JavaScript 8.2%Language:HTML 4.7%Language:SCSS 4.5%Language:Shell 0.0%