Maybe worth mentioning since it's a relatively undocumented feature, but the slotting feature that comes with the transculsion api could be helpful for the 2nd scenario:
Yes, the slotting feature is great an could help a lot depending on the scenario. When it comes to overloading templates and building reusable components i find the code to be easier to maintain with templateOutlet, but thatβs only my two cents.
Thanks for sharing π
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Maybe worth mentioning since it's a relatively undocumented feature, but the slotting feature that comes with the transculsion api could be helpful for the 2nd scenario:
Although it doesn't cover the union-type check in your example.
Yes, the slotting feature is great an could help a lot depending on the scenario. When it comes to overloading templates and building reusable components i find the code to be easier to maintain with templateOutlet, but thatβs only my two cents.
Thanks for sharing π