I am creating an ember application using the Ember.Facebook mixin (https://github.com/luan/ember-facebook) which requires the Ember app to be defined as:
App = Ember.Application.create(Em.Facebook);
However, I need to define some parameters for my app, such as
{
rootElement: 'survey',
autoinit: false,
nextStep: 1,
appId: 113411778806173
}
Ideally these are added to the app using
App = Ember.Application.create({
rootElement: 'survey',
autoinit: false,
nextStep: 1,
appId: 113411778806173
});
so that they are there on runtime, however it is necessary to use App.setProperties() with the ember.facebook mixin.
How can I define the mixin and the parameters in the Em.Application.create() call?
In ember master, use:
App = Ember.Application.createWithMixins(Em.Facebook, {
rootElement: 'survey',
autoinit: false,
nextStep: 1,
appId: 113411778806173
});
In previous releases of ember, you can use create
with the same syntax.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With