Scaffold an angular app

This tutorial is targeted to people familiar with JavaScript and HTML/CSS. You also will need:

  • Node.js up and running.
  • NPM (Node package manager) .

You can verify by typing:

1
2
3
4
node –version
## v12.13.0
npm –version
## 6.12.0

Angular CLI is the best way to get us started. We can download the tool and create a new project by running:

1
2
3
4
5
6
7
## install angular-cli globally
npm install -g @angular/cli # get latest

## Check angular CLI is installed
ng –version
## Angular CLI: 9.1.7

Angular CLI: 6.0.8
Node: 12.16.1
OS: win32 x64
Angular:

Scafold the app using the following command.

1
2
## create a new project
ng new Playground –style=scss

Note The last command takes some minutes. Leave it running and continue reading this tutorial.

The command ng new will do a bunch of things for us:

  1. Initialize a git repository
  2. Creates an package.json files with all the Angular dependencies.
  3. Setup TypeScript, Webpack, Tests (Jasmine, Protractor, Karma). Don’t worry if you don’t know what they are. We are going to cover them later.
  4. It creates the src folder with the bootstrapping code to load our app into the browser
  5. Finally, it does an npm install to get all the packages into node_modules.

Let’s run the app!

1
2
3
cd Playground
## builds the app and run it on port 9000
npm install rxjs@6.0.0 –save
ng serve —port 9000

1.In Git hub create Repository Playground.

Then in the command line prompt execute the following

  1. git init
  2. git add *
  3. git commit -m “Initial Commit.”
4.git remote add origin https://github.com/username/Playground.git  (GIT_CLONE_URL)
5.git branch -M master
6. git push -u origin master

reference: https://docs.github.com/en/github/importing-your-projects-to-github/adding-an-existing-project-to-github-using-the-command-line

Published by anthonykuong

Anthony is a versatile Software professional with around 10 years of experience. He is a Full Stack developer experienced with clients in the Financial, Health and Supply Chain industries. He is experienced with MVC frameworks ( Spring Boot) , SPA frameworks ( Angular , VueJS), and also supports automated build deployments and packaging for development, qa, and production servers.. He has delivered rich user experience using Modern web technologies and techniques such are HTML5, CSS3, ECMAScript 6 (ES6)/ ECMAScript 2015, CSS pre-processors (SASS, Less), JavaScript build tools (Grunt, Gulp) , various UI Frameworks including AngularJS , Knockout JS , and CSS Frameworks including Bootstrap, and Foundation. He is adaptable to new technologies and frameworks. He is a rigorous, quality-conscious contributor with solid analytical skills. I can also be found on youtube - Youtube Channel: https://www.youtube.com/user/akuong/

Leave a comment