How to create services in Angular 2
Before starting this article you must have some basic knowledge on Angular 2 , typescript and how to set up the Angular 2 application. If you are a newbie to Angular 2 then you can follow my below links . I am sure you will able to write the Angular 2 applications within 5 minutes. What is typescript ? http://whymysolutions.blogspot.com/2017/09/what-is-typescript.html Angular 2 project set up in Visual studio code and a Small Angular 2 application example. https://whymysolutions.blogspot.com/2018/09/angular2-application-in-visual-studio.html If you are comfortable with basic of Angular 2 then you can directly learn this article step by step. First we will describe the service creation and then we will use it in a small application. Step 1 : Create the service file First we will create a file having the name as m ydemoservice.service.ts . Here the *.service.ts* will same but the file name you can change. Step 2 : Imp...