Best place to set default options for a jQuery plugin?


#1

Hello,

I use a jQuery plugin (select2) in some components. We can define default options in $.fn.select2.defaults (like $.fn.select2.defaults.set("theme", "bootstrap");).

What is the best place with Ember to define these default options?

What do you think about define them in an initializer? If so, which initializer : Initializer orInstance-initializer?

Thanks,


#2

Put them in an initializer (instance-initializer will also work, won’t make much of a difference in this case).