Conversation
There was a problem hiding this comment.
We intend to add hasBlock? helper for this, I am unsure that we should suggest this (though checking template will likely always work).
|
Going to close from lack of reply/activity. Feel free to re-open if we can address @rwjblue's question. |
|
What was the question? lol. Looks like we are waiting on |
|
Accessing |
|
Also, setting |
|
@rwjblue so just replace template with hasBlock? |
|
What's the alternative to setting |
Yes, without the question mark: |
|
@rwjblue what about setting the template? What's the new API for that? |
|
There isn't one. The template for a component is supplied by the block provided by the calling location. Please explain the intent of changing the template of a component, maybe I have a better answer/explaination... |
|
For testing integration between different components, e.g. Or even static data, since you want to test if your component is behaving correctly when in block mode. |
|
For testing, you should be using the newer style component integration tests. We need more documentation for it though. Added in emberjs/ember-test-helpers#38, you can do something like this example from liquid-fire. |
Basically taken from https://gist.github.com/code0100fun/f5922b6f44eee2abc21d
Thanks @code0100fun and https://emberweekend.firebaseapp.com/episodes/the-weekend-strikes-back