Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

queryparams return boolean value as string #733

Closed
sabarivelanganesan opened this issue Oct 16, 2020 · 2 comments
Closed

queryparams return boolean value as string #733

sabarivelanganesan opened this issue Oct 16, 2020 · 2 comments

Comments

@sabarivelanganesan
Copy link

Hi,
When I use query params value as boolean it returns value as string("true" or "false") instead of(true or false).

Example:
controller/box.js
export default Controller.extend({
queryParams : ['canOpen'],
canOpen: false
});

template/box.hbs
{{#if canOpen}}
This block will happen
{{/if}}.

In the functionalty, I mentioned above. We are getting canOpen variable as string instead of boolean. So the condition doesn't get executed properly.

Does anyone know about this situation.

@sabarivelanganesan sabarivelanganesan changed the title queryparams return value as string for boolean queryparams return boolean value as string Oct 16, 2020
@villander
Copy link
Member

@sabarivelanganesan could you please provide some reproduction in a public repo?

@bertdeblock
Copy link
Contributor

@sabarivelanganesan What ember.js version are you using?

This old ember.js issue seems related. Someone mentions the same behaviour. Unless we get an up-to-date reproduction, I think we can close this issue since the other issue is closed as well?

@rwjblue rwjblue closed this as completed Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants