You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The template of the parent view has the placeholder div, and is responsible to place the div in the correct place in parent view. That is, the parent view owns the styling of the placeholder div itself, and the subview owns the mark-up and styling of anything inside the subview. (Separation of concern.)
Backbone allows this by the special options, e.g. id, and class, that can be passed and attached to the subview upon creation.
For backbone.subviews, it would be great if we, in a more declarative way, can allow the placeholderDiv to accept the id and class attributes and pass them to the creator function.
The text was updated successfully, but these errors were encountered:
Hi @joholo , thanks for the PR! There have been several other people who want access to the place holder div in the subview creator function, see #12 and #18. We have resisted adding this functionality as we do not think it is the cleanest pattern but it seems to be in high demand. I don't want to hold people back from doing things the way they see fit. We'll do a patch shortly that incorporates this functionality and also allows you to override how subviews are created as described in #20 (and currently available on https://github.com/rotundasoftware/backbone.subviews/tree/override-creator).
Thanks very much for your feedback and contribution.
The template of the parent view has the placeholder div, and is responsible to place the div in the correct place in parent view. That is, the parent view owns the styling of the placeholder div itself, and the subview owns the mark-up and styling of anything inside the subview. (Separation of concern.)
Backbone allows this by the special options, e.g. id, and class, that can be passed and attached to the subview upon creation.
For backbone.subviews, it would be great if we, in a more declarative way, can allow the placeholderDiv to accept the id and class attributes and pass them to the creator function.
The text was updated successfully, but these errors were encountered: