After updating to EmberJS 0.9.8.1 I now get two warnings:
WARNING: Computed properties will soon be cacheable by default. To enable this
in your app, set `ENV.CP_DEFAULT_CACHEABLE = true`.
And:
WARNING: The way that the {{view}} helper affects templates is about to change.
...SNIP... by setting `ENV.VIEW_PRESERVES_CONTEXT = true`.
This may seem like a stupid question, but how do I set these ENV variables? I've tried setting them a few different ways, and none make the WARNING message go away, and nothing in my App breaks either. Does that mean I'm in the clear? Or does it mean I'm not setting the ENV variables correctly?
Which (if any) of these is the right way to respond to these warnings? Do they not just do away when you set things based on their pleas? The warnings should probably document this better, or provide feedback that you set them.
You have to make sure that the ENV
variable is set, before Ember.js is loaded (defined in ember-metal/lib/core.js), see http://jsfiddle.net/pangratz666/jweyf/:
<!doctype html>
<body>
<script type="text/javascript" >
ENV = {
CP_DEFAULT_CACHEABLE: true,
VIEW_PRESERVES_CONTEXT: true
};
</script>
<script src="http://code.jquery.com/jquery-1.7.2.js"></script>
<script src="https://github.com/downloads/emberjs/ember.js/ember-0.9.8.1.js"></script>
...
</body>
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