Inputs as signals
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
...
Signals can be used as inputs using the classic Input decorator until they are passed out of the developer preview.
Wiki Markupcode |
---|
@Component(...) class Component { @Input({ alias: 'example' }) set value(value: unknown) { this.demo.set(value); } demo = signal<unknown | undefined>(undefined); } |
After Once Angular team release inputs as signals we can easily refactor our code to to
Wiki Markupcode |
---|
@Component(...) class Component { demo = input<unknown | undefined>(undefined); } |
...