Angular initial project setup

Setting up Angular project from scratch:Setting up angular project from scratch

1. Browse to the URL: and download the nodeJS
2. Install the nodeJS. Execute the command to test the installation

node -v
3. install angular-cli globally

npm install -g @angular/cli@latest

4. go to the project folder and create your project

ng new [PROJECTNAME] –style=[STYLE]

[PROJECTNAME] : replace with your project name

[STYLE]=  options are: css, sass, scss, less, stly
5. go to the project folder and compile the project   npm install

6. start the local server to test the project

ng serve –open

At this point, a default Angular project is cerated and can be seen at localhost:4200
7. Install the needed modules using the command

npm install @angular/[MODULE_NAME]@latest –save
This command will save the module configuration into the project configuration file “package.json”
8. If you use the Material Design, add the style URL to the main page or doenload the contents

9. If you use the Flex layout, install it using:

npm install –save @angular/flex-layout@latest
10. For basic layout, you can set a main style in de styles.scss file:

@import ‘~@angular/material/prebuilt-themes/deeppurple-amber.css’;

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s