Closed adriankremer closed 5 years ago
Angular 1 did it that way but unfortunately it does not work after minification as class Button
becomes function a
.
So they had to introduce a second syntax which allowed to pass the name in an array syntax.
Damn thats right. The only way would be to do something like
new Gondel({
components: {
componentA,
componentB
}
});
isnt it?
Correct that would work but would probably be very hard to type with typescript
@jantimon I already talked with you about a possible solution by defining the component name as static property - metadata reflection (sadly 😢) isn't a possibility in our case, since not every project uses gondel with typescript ...
cc @adriankremer
And I guess even if it would work the metadata would blow up the bundle size
To make it easier to spawn a component i want the ComponentName to be optional and to get the ClassName as default.
What changes did you make?
I made the componentName optional and invoked the className as default.
Does this pull request introduce a breaking change?
no!