Ember.Application.create with mixin and options

I am creating an ember application using the Ember.Facebook mixin (https://github.com/luan/ember-facebook), which requires the Ember application to be defined as:

App = Ember.Application.create(Em.Facebook); 

However, I need to define some parameters for my application, for example

 { rootElement: 'survey', autoinit: false, nextStep: 1, appId: 113411778806173 } 

Ideally, they are added to the application using

 App = Ember.Application.create({ rootElement: 'survey', autoinit: false, nextStep: 1, appId: 113411778806173 }); 

so that they are there at runtime, however, you must use App.setProperties () with ember.facebook mixin.

How can I define mixin and parameters in an Em.Application.create () call?

+4
source share
1 answer

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.

+13
source

All Articles