Posted On: Feb 22, 2018
It is a long-lived Ember object that can be made available in different parts of your application. It is created using the following syntax- “ember.service”
Example uses of Ember.js services include:
Services are generated with the help of ember CLI’s service generator. If you want to access a service, inject it either in an initializer or use the following syntax- “ember.inject”. Using this you can even access the properties and methods using services. Use the following syntax to define a service:
ember generate service service_name;
Never Miss an Articles from us.