ember.js - ember-i18n : TypeError: app[initializerType] is not a function -
i've been installing ember-i18n
on working ember project. (https://github.com/jamesarosen/ember-i18n)
after registering initializer app/initializers/i18n.js
:
export default { name: 'i18n', after: 'ember-i18n', initialize: function(_, app) { app.inject('model', 'i18n', 'service:i18n') } };
and relaunching server, error in console :
app[initializertype] not function
do have idea ?
ember version : "ember": "1.11.1"
it looks format of initializer not correct. per this example ember guides, there 2 important parts. first, factory must registered (application.register) , must injected (application.inject).
ember.application.initializer({ name: 'logger',
initialize: function(container, application) { var logger = { log: function(m) { console.log(m); } }; application.register('logger:main', logger, { instantiate: false }); application.inject('route', 'logger', 'logger:main'); } });
Comments
Post a Comment