This project was generated using Angular CLI version 19.2.10.
It has been modified for demonstration of Practice Activies for Frontend Framworks. Joanne Hoar, May 2025
See https://code.visualstudio.com/docs/nodejs/angular-tutorial
node -v
npm -vnpm install -g @angular/clinpm list -g --depth 0 ng new practiceIf you're not doing git, you can use --skip-git option in project creation.
ng new --skip-git practiceOpen the project folder in VS Code:
cd practice
code .Choose the source control tab select publish branch, authenticate your github account.
To start a local development server, run:
ng serveOnce the server is running, open your browser and navigate to http://localhost:4200/. The application will automatically reload whenever you modify any of the source files.
See https://v17.angular.io/cli/lint And https://eslint.org/docs/latest/
ng lintTry adding this to main.ts then run lint again.
const pi = 3.14ng testOpen the file app.component.spec.ts to edit to re-run tests.
Photos generated by https://www.recraft.ai/
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
ng generate component component-nameFor a complete list of available schematics (such as components, directives, or pipes), run:
ng generate --helpEdit the component html, css and typescript to make the product look right.
Generate another component that displays a list of products. In this example, it loads a json value into a variable. Make the product component take input fields.
Generate two more components for the header and footer. Edit the html and css.
Much of this is example is found https://angular.dev/guide/routing/router-tutorial and https://angular.dev/guide/templates/two-way-binding and https://angular.dev/guide/routing/common-router-tasks.
In this example, uses the products home component with parameter for category.