We are using Angular 5 and material design and creating our own components with helper methods for various functions (i.e. dynamic column generation for mat-table).
I'd like a way to pass unknown attributes from my parent component onto my child component. This is easy in React, for example:
App class render
<MyDatatable knownVar="1" otherKnownVar="2" unknownButKnownToChildVar="3" />
MyDataTable render
<MatComponent {...this.props} />
This way if MatComponent ever updated what attributes it took in, MyDataTable wouldn't have to be updated. I've looked at the @Input decorator but this doesn't seem to facilitate unknown variables.
One solution I've thought of is to just pass in an object and account for that object via @Input but I don't like this because I would like the angular-material component documentation to accurately reflect how a developer should be using my MyDataTable component.
Short version of my question: How do I pass unaccounted for attribute-level data to a child component in Angular 5?
<MyAngComponent unknownAttribute="1">would be impossible to pass through to a child component without specifically supplying an@Inputselector forunknownAttributeinMyAngComponentclass - Vap0r