This allows you to write @Input() in much the same way as the typescript API:
@Component(
...
inputs = js.Array("the-hero:hero")
)
class TheComponent {
var hero: js.UndefOr[Hero] = js.undefined
}
can now be written as:
@Component(
...
)
class TheComponent {
@Input("the-hero")
var hero: js.UndefOr[Hero] = js.undefined
}
@Input() works with no parameter as well and if you explicitly specify the inputs parameter it will merge the annotation inputs with the parameter passed in.
This allows you to write
@Input()
in much the same way as the typescript API:can now be written as:
@Input()
works with no parameter as well and if you explicitly specify theinputs
parameter it will merge the annotation inputs with the parameter passed in.