Services In Angular 2
Services are the building blocks that Angular provides for the definition of the business logic of our applications. In AngularJs 1.x, we had three different ways for defining services:
// The Factory method
module.factory('ServiceName', function (dep1, dep2, …) {…