Ember.Service

What Are Ember.Service Class?

What Are services in ember.js?
An Ember.Service is a class singleton object that holds on to state. It's never destroyed as long as the application runs.

Services are generated with the help of ember CLI service generator.

Services can be helpful in diffrents situations i.e.
1.      Session Data
2.      Server-sent events or notifications
3.      APIs that talk to a server
4.      Web Sockets
5.      Geo Location data
6.      Events pushed from a server
7.      Third-party APIs
8.      Logging

Example - Services must extend the Ember.Service base class
import Ember from 'ember';

export default Ember.Service.extend({
});

ANIL SINGH

Anil Singh is an author, tech blogger, and software programmer. Book writing, tech blogging is something do extra and Anil love doing it. For more detail, kindly refer to this link..

My Tech Blog - https://www.code-sample.com/
My Books - Book 1 and Book 2

What Are Ember.Service Class? What Are Ember.Service Class? Reviewed by Anil Singh on 2:48 AM Rating: (5)
www.code-sample.com/. Powered by Blogger.
^