How do I create a singleton service in Angular 2?
Update (Angular 6 +) The recommended way to create a singleton service has changed. It is now recommended to specify in the @Injectable decorator on the service that it should be provided in the ‘root’. This makes a lot of sense to me and there’s no need to list all the provided services in your … Read more