Closed michaelarick closed 8 years ago
I think the issue here is a client side async race condition. I'm a bit fuzzy on the details of how we worked around it, but we had to listen to something that'd wait for the child views to be ready. @ingiulio might better remember...
@michaelarick it's because of the way you're passing the scopes around - set the model variable on the view to explicitly pass it in.
= view 'components/todo_list' model=_model
= view '/petition/manage/components/todo_list/fake_item' model=model
also, for general questions please post to the stackoverflow questions http://stackoverflow.com/questions/tagged/rendr ideally would like to keep the issues to be issues w/ rendr and bug reporting and questions on stackoverflow :)
I have a view with the following template:
And the view does this in postRender:
So where that view is used, I should be able to put subviews in and have them be child views of the view, and have my top-level view, the todo-list, know when a subview triggers ch:completed:
For example:
This code works fine as long as the view is server-side rendered. When it is client-side rendered, the todo_list/fake_item doesn't know about its model.
Any suggestions on how to solve or workaround this would be appreciated.