Skip to content

Instantly share code, notes, and snippets.

@pixelhandler
Forked from lan0/controllers.application.js
Last active April 8, 2016 16:43
Show Gist options
  • Select an option

  • Save pixelhandler/4b7de2e49239591015e395946feb10df to your computer and use it in GitHub Desktop.

Select an option

Save pixelhandler/4b7de2e49239591015e395946feb10df 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": "https://cdnjs.cloudflare.com/ajax/libs/ember.js/2.4.3/ember.js",
"ember-template-compiler": "release"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment