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

Controller properties unavailable in subexpressions in ember-cli-async-button's parameters #41

Closed
lolmaus opened this issue May 7, 2015 · 3 comments

Comments

@lolmaus
Copy link
Contributor

lolmaus commented May 7, 2015

In my page controller I have created the following property:

foo: true

Now, in my page template I'm doing this:

{{ ember-cli-async-button default=(if foo 'Hello' 'World') }}

A button with no text as rendered!

At the same time, these work fine:

{{ ember-cli-async-button default=(if true 'Hello' 'World') }} -- rendes button with `Hello`
{{ ember-cli-async-button default=foo }} -- rendes button with `true`

dafuq

I've tried reproducing the problem with a boilerplate component.

I have created an app/templates/components/x-bar.hbs file with the following content:

{{ default }}

Now, in my page template I'm doing this:

{{ x-bar default=(if foo 'Hello' 'World') }}

It renders as Hello. Thus I conclude that the issue is specific to ember-cli-async-button.

@lolmaus
Copy link
Contributor Author

lolmaus commented May 7, 2015

The problem also exists for attribute bindings, e. g. disabled.

@bcardarella
Copy link
Member

@lolmaus I suspect this issue is because we are proxying to the component through a helper and your options are being washed out. With emberjs/ember.js#11028 we should be able to support what one want once this gets into Release Ember

@lolmaus
Copy link
Contributor Author

lolmaus commented May 7, 2015

You're right. I did this and it worked!

`import AsyncButton from 'ember-cli-async-button/components/async-button'`

AssButtComponent = AsyncButton.extend()

`export default AssButtComponent`

@courajs courajs closed this as completed Nov 16, 2015
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

3 participants