trotyl / ng-vdom

(Developer Preview) A virtual-DOM extension for Angular, also work as React bridge.
259 stars 12 forks source link

Feature: project child to matched slot by selector #66

Open trotyl opened 5 years ago

trotyl commented 5 years ago

Current

All children are projected to default slot.

Expected

<p>Start</p>
<ng-content select="p"></ng-content>
<p>Middle</p>
<ng-content select="div"></ng-content>
<p>End</p>

Can be used with:

function render() {
  return (
    <MyComp>
      <p>Foo</p>
      <p ngProjectAs="div">Bar</p>
    </MyComp>
  )
}

Note: