Last active
June 8, 2018 21:24
-
-
Save misterbyrne/848aa7301beddaf7728a5d6dece31746 to your computer and use it in GitHub Desktop.
init controller
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({ | |
| applicationController: Ember.inject.controller('application'), | |
| thing: Ember.on('init', function() { | |
| $('input.a').prop('checked', true); | |
| }) | |
| }); |
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', | |
| message: 'hi', | |
| init: Ember.on('init', function() { | |
| const router = Ember.getOwner(this).lookup("router:main"); | |
| const url = router.generate('a'); | |
| this.set('urlForA', url); | |
| this.set('version', Ember.VERSION); | |
| }), | |
| }); |
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({ | |
| applicationController: Ember.inject.controller('application'), | |
| thing: Ember.on('init', function() { | |
| $('input.b').prop('checked', true); | |
| }) | |
| }); |
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('a'); | |
| this.route('b'); | |
| this.route('c'); | |
| }); | |
| 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
| { | |
| "version": "0.14.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": "2.14.1", | |
| "ember-template-compiler": "2.14.1" | |
| }, | |
| "addons": {} | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment