Skip to content

Instantly share code, notes, and snippets.

@allthesignals
Created June 15, 2016 23:20
Show Gist options
  • Select an option

  • Save allthesignals/286e5b017795cb2779f93eeec0c8f905 to your computer and use it in GitHub Desktop.

Select an option

Save allthesignals/286e5b017795cb2779f93eeec0c8f905 to your computer and use it in GitHub Desktop.
Boolean String Bug
import Ember from 'ember';
export default Ember.Controller.extend({
queryParams: ["redevelopment"],
redevelopment: null,
actions: {
toggleIt: function() {
var value = this.get("redevelopment");
this.toggleProperty("redevelopment");
this.set("typeof", typeof value);
}
}
});
Controller property as query parameter:
<br/>
<button{{action "toggleIt"}}>Click This</button>
<br />
Value: {{this.redevelopment}} <br />
Typeof: {{this.typeof}}
{
"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