lundi 16 février 2015

why are there 3 different names for an Ember initializer

When you generate a service with Ember CLI you get something like this:



export function initialize(container, application) {
application.inject('route', 'geoService', 'service:geo');
application.inject('component', 'geoService', 'service:geo');
}

export default {
name: 'geo-service',
initialize: initialize
};


You will notice that includes 3 different name formats for the service - geoService, service:geo and geo-service. Why is this needed and what is each of them? It's pretty confusing this way.


Aucun commentaire:

Enregistrer un commentaire