Skip to content

Instantly share code, notes, and snippets.

@josa42
Last active November 25, 2016 12:26
Show Gist options
  • Save josa42/08568c542a88a224dd07103afa3c734e to your computer and use it in GitHub Desktop.
Save josa42/08568c542a88a224dd07103afa3c734e to your computer and use it in GitHub Desktop.
query-param-test
import Ember from 'ember';
export default Ember.Controller.extend({
queryParams: ['type'],
type: null,
actions: {
setType(type) {
this.set('type', type);
}
}
});
type: {{type}}
<br><br>
<button onclick={{action 'setType' 'A'}}>A-Type</button>
<button onclick={{action 'setType' 'B'}}>B-Type</button>
{
"version": "0.10.6",
"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.9.0",
"ember-data": "release",
"ember-template-compiler": "2.9.0",
"ember-testing": "2.9.0"
},
"addons": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment