Last active
September 17, 2018 20:09
-
-
Save gorner/ee98de6c5f0f8342e8fff0388f795289 to your computer and use it in GitHub Desktop.
core-mixins
This file contains hidden or 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'; | |
| export default Ember.Controller.extend({ | |
| appName: 'Ember Twiddle' | |
| }); |
This file contains hidden or 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
| export default Ember.Mixin.create({ | |
| updateModel() { | |
| return (this._super() || '') + '1'; | |
| } | |
| }); |
This file contains hidden or 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 CoreFooMixin from 'app/mixins/routes/core-foo'; | |
| export default Ember.Mixin.create(CoreFooMixin, { | |
| updateModel() { | |
| return (this._super() || '') + '3'; | |
| } | |
| }); |
This file contains hidden or 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 EmberRouter from '@ember/routing/router'; | |
| import config from './config/environment'; | |
| const Router = EmberRouter.extend({ | |
| location: 'none', | |
| rootURL: config.rootURL | |
| }); | |
| Router.map(function() { | |
| this.route('foo', {path: '/'}); | |
| }); | |
| export default Router; |
This file contains hidden or 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 CoreFooMixin from 'app/mixins/routes/core-foo'; | |
| export default Ember.Route.extend(CoreFooMixin, { | |
| updateModel() { | |
| return (this._super() || '') + '2'; | |
| } | |
| }); |
This file contains hidden or 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 CoreFooRoute from 'app/routes/core-foo'; | |
| import FooMixin from 'app/mixins/routes/foo'; | |
| export default CoreFooRoute.extend(FooMixin, { | |
| updateModel() { | |
| return (this._super() || '') + '4'; | |
| }, | |
| model() { | |
| return this.updateModel(); | |
| } | |
| }); |
This file contains hidden or 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.0", | |
| "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.2.2", | |
| "ember-template-compiler": "3.2.2", | |
| "ember-testing": "3.2.2" | |
| }, | |
| "addons": { | |
| "ember-data": "3.2.0" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment