@fivetanley You could even do it within templates via helpers, just like in your lib
@samselikoff @fivetanley @tomdale that doesn't address the issue, because now sync code relies on some other temporally prior code running
-
-
@samselikoff@fivetanley@tomdale in practice that seems "easy" in your first route and becomes confusing / magic / implicit rapidly -
@wycats@fivetanley@tomdale if you wanted the template to trigger the fetch, you could use a helper, like https://github.com/fivetanley/ember-promise-helpers … -
@wycats@fivetanley@tomdale if you didn't, you can call post.get("comments") wherever you like. didInsertElement, didReceiveAttrs, etc -
@wycats@fivetanley@tomdale you could use that promise to set a bool for your template, or render based on its state -
@wycats@fivetanley@tomdale but now it doesn't leak everywhere else. post.get('comment') is always a DS.Model -
@samselikoff@fivetanley@tomdale unless it's undefined -
@wycats@fivetanley@tomdale but that's true of everything? Post.content is something altogether different
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.