ndb-core icon indicating copy to clipboard operation
ndb-core copied to clipboard

Evaluate the use of @Input() transform functions with regard to dynamic component generation

Open tomwwinter opened this issue 1 year ago • 0 comments

We build some Angular Components at runtime within our Application. Some Components may require variables and also may transform the passed in Data in some ways.

The current way of implementation is handling these transformation within the Setter. Angular has also a build in way by passing a transform functions to the @Input annotation:

@Input({ transform: (value: any) => value as SelectableFilter<E> })
filterConfig: SelectableFilter<E>;

We need to evaluate, if this approach works fine within our existing code and Component generation mechanics.

tomwwinter avatar Jan 12 '24 12:01 tomwwinter