- EmberJS Tutorial
- EmberJS - Home
- EmberJS - Overview
- EmberJS - Installation
- EmberJS - Core Concepts
- Creating and Running Application
- EmberJS - Object Model
- EmberJS - Router
- EmberJS - Templates
- EmberJS - Components
- EmberJS - Models
- EmberJS - Managing Dependencies
- EmberJS - Application Concerns
- EmberJS - Configuring Ember.js
- EmberJS - Ember Inspector
- EmberJS Useful Resources
- EmberJS - Quick Guide
- EmberJS - Useful Resources
- EmberJS - Discussion
EmberJS - Services
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.
emberjs_application_concerns.htm
Advertisements