Last active
August 16, 2016 14:40
-
-
Save MiguelMadero/a71b45443c4394c2c60a7c7bb7e7f9c4 to your computer and use it in GitHub Desktop.
New Twiddle
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'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
init () { | |
this._super(...arguments); | |
console.log('app controller init'); | |
Ember.run.scheduleOnce('afterRender', function () { | |
console.log('app controller init afterRender'); | |
}); | |
} | |
}); |
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 config from './config/environment'; | |
const Router = Ember.Router.extend({ | |
location: 'none', | |
rootURL: config.rootURL | |
}); | |
Router.map(function() { | |
this.route('blog'); | |
}); | |
export default Router; |
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'; | |
export default Ember.Route.extend({ | |
actions: { | |
didTransition () { | |
console.log('app didTransition '); | |
Ember.run.next(function () { | |
console.log('app didTransition next'); | |
}); | |
Ember.run.scheduleOnce('afterRender', function () { | |
console.log('app didTransition afterRender'); | |
}); | |
} | |
}, | |
beforeModel () { | |
return Ember.$.get('https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js').then(()=>console.log('app beforeModel')); | |
} | |
}); |
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'; | |
export default Ember.Route.extend({ | |
actions: { | |
didTransition () { | |
console.log('blog didTransition '); | |
Ember.run.next(function () { | |
console.log('blog didTransition next'); | |
}); | |
Ember.run.scheduleOnce('afterRender', function () { | |
console.log('blog didTransition afterRender'); | |
}); | |
} | |
}, | |
beforeModel () { | |
return Ember.$.get('https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js').then(()=>console.log('blog beforeModel')); | |
} | |
}); |
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'; | |
export default Ember.Route.extend({ | |
redirect () { | |
console.log('index redirect'); | |
this.transitionTo('blog'); | |
}, | |
}); | |
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.10.4", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "2.7.0", | |
"ember-data": "2.7.0", | |
"ember-template-compiler": "2.7.0" | |
}, | |
"addons": {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment