Skip to content

00 Up and Running

Chris T edited this page Oct 30, 2019 · 6 revisions

Create the workspace

create-nx-workspace angular-core-workshop --preset=empty --cli=angular --npmScope=workshop

Add Nrwl Angular Schematics

ng add @nrwl/angular

Generate the application

ng generate @nrwl/angular:application dashboard

Follow the prompts:

Which stylesheet format would you like to use? SASS(.scss)

Would you like to configure routing for this application? y

Add Angular Material

ng add @angular/material

Follow the prompts:

Choose a prebuilt theme name, or "custom" for a custom theme: Deep Purple/Amber

Set up HammerJS for gesture recognition? Yes

Set up browser animations for Angular Material? Yes

Running the app

ng serve
ng serve --project=dashboard
ng test
ng build 

Important!

  1. Install server dependencies
npm i --save-dev concurrently json-server jsonwebtoken`
  1. Update package.json
"server:all": "concurrently \"npm run server\" \"ng serve\" \"npm run server:auth\"",
"server:auth": "node server/server.js",
  1. Copy styles.scss from RESOURCES into app/dashboard/src
  2. Copy assets from RESOURCES into app/dashboard/src