-
Notifications
You must be signed in to change notification settings - Fork 0
task#00 preparation
bacn edited this page Sep 16, 2020
·
1 revision
#Preparation with angular-cli
Both the CLI and generated project have dependencies that require Node 10.3 or Node 12.0 or higher, together with NPM 6.7.0 or higher.
If you're using Angular CLI beta.28 or less, you need to uninstall angular-cli package. It should be done due to changing of package's name and scope from angular-cli to @angular/cli:
npm uninstall -g angular-cli
Global package:
npm uninstall -g @angular/cli
npm cache clean
npm install -g @angular/cli@latest
If you get errors during installation about access denied you can try to install node.js with nvm (node version manager). hints
Create new project with angular-cli:
ng new PROJECT_NAME
Go into project directory:
cd PROJECT_NAME
Replace PROJECT_NAME with e.g. auction-tutorial-y2020.
- The
newcommand will ask you about adding a routing... please pressyes. - For the stylesheet format you can use
scss. We will use in the tutorial scss. Task#07 will instruct you how to refactor if you have chosen css for now.
ng new auction-tutorial-y2020
? Would you like to add Angular routing? Yes
? Which stylesheet format would you like to use?
CSS
❯ SCSS [ https://sass-lang.com/documentation/syntax#scss ](https://sass-lang.com/documentation/syntax#scss )
Sass [ https://sass-lang.com/documentation/syntax#the-indented-syntax ](https://sass-lang.com/documentation/syntax#the-indented-syntax )
Less [ http://lesscss.org ](http://lesscss.org )
Stylus [ http://stylus-lang.com ](http://stylus-lang.com)
Start project (watchers + build process):
ng serve
Open project in browser
- Open your browser with the address http://localhost:4200/
- Open in IDE (exclude dist and tmp in Webstorm)

- open the file polyfills.ts
- uncomment the import statements
run the neccessary npm commands
npm install --save classlist.js
npm install --save intl
npm install --save web-animations-js
- update npm via
npm -g i npm
or use nvm (node version manager).
- Go to the Webstorm menu and choose File->New->Project
- Choose Angular CLI