Component reuse at different mount points

8 views
Skip to first unread message

James Cook

unread,
Aug 24, 2016, 11:05:25 AM8/24/16
to AngularJS
I have a table with many master rows, with a trigger to expand/collapse a hidden detail row beneath the master row. The detail row contains a component that presents detail information of the row above it.

Because the detail component is moderately expensive, I do not wish to add one to each master row. Rather, I would like to create a single instance of this component, and inject it into the expanding table cell row just prior to expanding the row. When the row is collapsed, the component can be removed (relocated) in the DOM.

Is there a convenient Angular 2 way of accomplishing this?

-- jim
Reply all
Reply to author
Forward
0 new messages