Prevent Ember from creating objects on the window?


#1

Is there a way to Prevent Ember from creating objects on the window?

I’m working on converting an existing Backbone/Marionette app to Ember.js. It’s modular enough I can use Ember for routing, and create Ember components that run portions of the old code.

Ember is overwriting the older version of jQuery I have loaded, which is required by the legacy code. I’ve solved this by changing the order that scripts are loaded, but I’m curious if it’s possible to isolate Ember and dependancies from the global scope.

Any ideas?


#2

Ember doesn’t do anything to jQuery - it just is dependent on it. So it will include it in the vendor.js but doesn’t do anything special.

I don’t believe there is any way to prevent ember creating any objects on window.


#3

Ember is creating only one global variable - Ember (and create one other - DS, if ember-data is used)


#4

Thanks. I ended up removing jQuery from Ember’s vendor files, as it will always be on the page already.