ember-stargate
ember-stargate copied to clipboard
Q: when count eq zero
Would it be safe to wrap the render in a conditional so it won't output when nothing is added?
https://github.com/kaliber5/ember-stargate/blob/master/addon/components/portal-target.hbs
{{#if this.count}}
<div
{{did-insert this.register}}
{{will-destroy this.unregister}}
...attributes
>
{{yield this.count}}
</div>
{{/if}
Hm, I don't think this would work right now, as rendering into the portal target using in-element happens before the portal is registered (so count is still 0). See https://github.com/kaliber5/ember-stargate/blob/master/addon/components/portal.js#L11