Skip to content

Instantly share code, notes, and snippets.

@Arkham
Last active July 13, 2016 20:26
Show Gist options
  • Save Arkham/23c9bc41197b73fc8874a35b04c1a635 to your computer and use it in GitHub Desktop.
Save Arkham/23c9bc41197b73fc8874a35b04c1a635 to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
queryParams: [
{ perPage: 'per_page'}
]
});
import Ember from 'ember';
export default Ember.Controller.extend({
});
import Ember from 'ember';
import config from './config/environment';
const Router = Ember.Router.extend({
location: 'none'
});
Router.map(function() {
this.route('other');
});
export default Router;
import Ember from 'ember';
export default Ember.Route.extend({
queryParams: {
perPage: { refreshModel: true },
},
setupController(controller) {
controller.set('perPage', 10);
this.transitionTo('other');
}
});
import Ember from 'ember';
export default Ember.Route.extend({
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
{{outlet}}
<br>
<br>
<p>Hello, I'm other</p>
{
"version": "0.7.1",
"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.4.4",
"ember-data": "https://cdnjs.cloudflare.com/ajax/libs/ember-data.js/2.4.3/ember-data.js",
"ember-template-compiler": "2.4.3"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment