Created
August 7, 2019 18:42
-
-
Save k-fish/113f55c88daed54095648dafd2b50517 to your computer and use it in GitHub Desktop.
Mixin behaviour
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
import A from 'app/mixin/a'; | |
import B from 'app/mixin/b'; | |
export default Ember.Controller.extend(A, { | |
appName: 'Ember Twiddle', | |
value: 'nothing', | |
foo() { | |
this._super(); | |
}, | |
actions: { | |
changeValue() { | |
this.foo(); | |
} | |
} | |
}, B); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Mixin from "@ember/object/mixin"; | |
export default Mixin.create({ | |
foo() { | |
this.set('value', 'a'); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Mixin from "@ember/object/mixin"; | |
export default Mixin.create({ | |
foo() { | |
this._super(); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.15.1", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.js", | |
"ember": "3.4.3", | |
"ember-template-compiler": "3.4.3", | |
"ember-testing": "3.4.3" | |
}, | |
"addons": { | |
"ember-data": "3.4.2" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment