Is it possible to do aliasing for inputs and outputs?
Yes, it is possible to do aliasing for inputs and outputs in two ways.
- Aliasing in metadata: The inputs and outputs in the metadata aliased using a colon-delimited (:) string with the directive property name on the left and the public alias on the right. i.e. It will be in the format of propertyName:alias.
inputs: ['input1: buyItem'],outputs: ['outputEvent1: completedEvent']
- Aliasing with @Input()/@Output() decorator: The alias can be specified for the property name by passing the alias name to the @Input()/@Output() decorator.i.e. It will be in the form of @Input(alias) or @Output(alias).
@Input('buyItem') input1: string;@Output('completedEvent') outputEvent1 = new EventEmitter<string>();
July 08, 2022
557
Read more
What is Angular Framework?
November 04, 2022
AngularWhat is a Angular module?
November 03, 2022
AngularWhat are the steps to use animation module?
October 31, 2022
Angular