DEV Community

Discussion on: React Context In Angular

Collapse
 
wldomiciano profile image
Wellington Domiciano

Nice! Thanks for sharing.

As a suggestion, you could replace @Components with @Directive+<ng-container> to avoid inserting unnecessary elements into the DOM, what do you think?

Collapse
 
ezzabuzaid profile image
ezzabuzaid • Edited

The initial implementation was using directives only, put simply, components are more clear, more friendly if you well.

I don't understand exactly how directives over ng-container will work, but using attribute directives with elements can work just the same.