Skip to content

Instantly share code, notes, and snippets.

@kellyselden
Last active December 4, 2016 22:25
Show Gist options
  • Save kellyselden/a6f37f20e21f638cc2f6f221875eef9d to your computer and use it in GitHub Desktop.
Save kellyselden/a6f37f20e21f638cc2f6f221875eef9d to your computer and use it in GitHub Desktop.
ember 2.10 + jquery 3: fail
import Ember from 'ember';
export default Ember.Component.extend({
isPlainObject: Ember.computed('options', function() {
let options = this.get('options');
return Ember.$.isPlainObject(options);
}),
jqueryVersion: Ember.$.fn.jquery
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
{{outlet}}
<br>
<br>
{{my-component options=(hash key="test key")}}
{{yield}}
jquery version: {{jqueryVersion}}
<br>
options is plain object: {{isPlainObject}}
{
"version": "0.10.6",
"EmberENV": {
"FEATURES": {}
},
"options": {
"use_pods": false,
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.js",
"ember": "2.10.0",
"ember-template-compiler": "2.10.0",
"ember-testing": "2.10.0"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment