Best place to set default options for a jQuery plugin?

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 or Instance-initializer?

Thanks,

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

1 Like