We are going to learn something other that java now. It’s great to have Angular to your skill set. In this article we are going to create a simple hello world app in angular 4.
Hello World App in Angular 4:
- Node JS : Please install node js according to instructions provided on official site.
- Visual Studio Code: Extremely good IDE. I am going to use this for tutorial series.
Once you have installed both, open your command prompt and type node -v, you should be able to see something like below
It means you have successfully installed node js.
Create app from Angular CLI:
Angular CLI is an awesome tool to get started with a angular 4 project. It creates a fully functional well structured project for us which we can take forward.
- Install Angular CLI using command npm install -g @angular/cli . -g option means it is installed globally for our system. Check angular version using ng -v.
- Create our first app using command
ng new hello-world It will take a while and create a fully fledged app for you.
- Now you will have your folder created called hello-world. navigate to it using cd hello-world and then do ng serve. You can see server is started.
Open your browser and visit localhost:4200 You will see “App works” printed on screen.
I hope this article helped you get started with Hello World App in Angular 4. In next article we will look at the structure of app and understand it thoroughly.