Skip to content

Instantly share code, notes, and snippets.

@allthesignals
Last active June 17, 2016 15:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save allthesignals/3afa1091106a91ce2c1734ae2998bc3f to your computer and use it in GitHub Desktop.
Save allthesignals/3afa1091106a91ce2c1734ae2998bc3f to your computer and use it in GitHub Desktop.
Boolean QueryParam Fix
import Ember from 'ember';
export default Ember.Controller.extend({
queryParams: [{ redevelopment: { type: 'boolean' } }],
redevelopment: null,
actions: {
toggleIt: function() {
this.toggleProperty("redevelopment");
console.log(this.get("redevelopment"));
}
}
});
Controller property as query parameter:
<br/>
<button{{action "toggleIt"}}>Click This</button>
<br />
Value: {{this.redevelopment}}
{
"version": "0.9.2",
"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.6.0",
"ember-data": "2.6.0",
"ember-template-compiler": "2.6.0"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment