This repository was archived by the owner on Apr 25, 2023. It is now read-only.
This repository was archived by the owner on Apr 25, 2023. It is now read-only.
Remove requirement from adding items to constructor #1
Open
Description
Right now, there's a requirement to have two items in your constructor if you intend to use props
in the @Setup
directive:
@Setup((props, detectChanges) => {
// ...
})
@Component({
selector: 'test'
})
class TestComponent implements OnChanges {
// These two items in your constructor are required, currently
constructor(private componentFactoryResolver: ComponentFactoryResolver, private cd: ChangeDetectorRef) {
}
// This is required, even if empty
ngOnChanges() {}
}
These two items are confusing to new users, a bit janky of a requirement, can cause bugs when not present, and is generally just subideal for the usage of the library. I would love to figure out a way to remove these from the consuming component constructor