Though setting up angular application for any 2+ version has same steps and is so easy that it take only 10 min to create first angular app but here we added steps to re-iterate the things again so that to ease readers to create their app in agular 8. This article helps readers to setting up a step by step angular 8 app.
To start with an angular project, there are some pre-requisites which are essential for building your angular app. We must have node.js, npm, Angular CLI and any IDE like Web Storm, Visual Studio Code installed on system. We will do all step by step.
Step 1) Install node.js. Download node.js setup ffrom node.js website https://nodejs.org/en/
Once node is installed, you can check node and npm version by running below commands
Step 2) Install angular cli
It will install latest cli version if don't specify any version name explicitly. To install specific version use below command
npm install -g @angular/cli@version
to check ng version, use "ng -v" command
Step 3) Now install visual studio code. We are using Visual Studio Code as IDE. You can download setup from visual sudio code website. Here is the link https://code.visualstudio.com/download
Step 4) Once setup for node, npm, angular cli and visual studio is completed, you are ready to create your first angular 8 app. Now create any folder where you want to create you app and navigate to that folder and run below command.
It will ask few question like "Do you want to add routing" and which style format you want to use. These are new features included from Angular 7 I believe. In previous there features were not available.
Step 5) To build and run your app, run below command
ng serve -o
It will build app, and run on localhost:4200 port
Here is new template for angular 8 which is different than previous versions template.
To open your app in visual studio IDE, enter simple below command inside project location and it visual studio opens up automatically.
One point to note that in angular 8 you will see angular.json file used for configuration along with package.json file.
Hope it helps. In next article we will do a walkthrough and create a basic angular 8 projet from scratch.