rendrjs / rendr

Render your Backbone.js apps on the client and the server, using Node.js.
MIT License
4.09k stars 313 forks source link

Fix client side issue when partial view is nested in another partial view #512

Closed brian-hall closed 8 years ago

brian-hall commented 8 years ago

A view that is comprised of nested partial views fails when rendered on the client.

example emblem setup would be:

partial_1.emblem:

div h2 Partial 1 == _block

partial_2.emblem:

div h2 Partial 2 == _block

sub_view.emblem:

h2 Sub View

main_view.emblem:

= view partial_1 =view partial_2 = sub_view

saponifi3d commented 8 years ago

This is an issue with the view layer and not with rendr itself.

Since I have a little bit of insight on what you're stack is like, :stuck_out_tongue:, you should make this change in rendr-handlebars. (https://github.com/rendrjs/rendr-handlebars/blob/master/shared/helpers/view.js is where the fix should probably go)

However, I've not seeing issues with doing this in the past.