EmberJS – Services

  • Post author:
  • Post category:EmberJS
  • Post comments:1 Comment
Service

Service is an Ember object which can be made available in the different parts of the application.

Services can be used in different kinds of areas βˆ’

  • Geolocation
  • Third-party APIs
  • Events or notifications sent by server
  • User or session authentication
  • Logging
  • WebSockets

You can create the service by using the following command βˆ’

ember generate service service-name

When you run the above command, it will display the following code format βˆ’

import Ember from 'ember';

//services must extend the Ember.Service base class
export default Ember.Service.extend ({
});

For more about services along with an example, see this link.

Previous Page:-Click Here

This Post Has One Comment

Leave a Reply