Skip to content

Instantly share code, notes, and snippets.

@lan0
Last active April 8, 2016 16:42
Show Gist options
  • Select an option

  • Save lan0/48d144fbb71cb96220e42dbd664eaef3 to your computer and use it in GitHub Desktop.

Select an option

Save lan0/48d144fbb71cb96220e42dbd664eaef3 to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
queryParams: ['foo'],
foo: 1,
actions: {
increment() {
this.incrementProperty('foo');
this.send('refreshRoute');
},
},
});
import Ember from 'ember';
export default Ember.Route.extend({
actions: {
refreshRoute() {
this.refresh();
},
},
});
<button {{action "increment"}}>Increment query param</button>
{{foo}}
{
"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": "release",
"ember-data": "https://cdnjs.cloudflare.com/ajax/libs/ember-data.js/2.4.3/ember-data.js",
"ember-template-compiler": "release"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment