How do I move all the Inputs and Outputs of a Parent Component into Typescript, rather than HTML?
I have the following with a long list of parameters in Parent, sending and receiving data from Child Component. Would like them to be in Typescript. How can this be transferred?
<app-address-type-dropdown class="addresstype" (addressTypeChange)="addressTypeChangeEvent($event)"
[addressTypeDefaultItem]="addressEntryConfig.addressTypeDefaultValue"
[selectedAddressType]="addressEntryConfig.selectedAddressType"
[valuesToExclude]="addressEntryConfig.addressTypeDropdownListExclusion">
</app-address-type-dropdown>
Goal:
<app-address-type-dropdown> </app-address-type-dropdown>
<!-- With input and output parameters in the Typescript file -->
- The purpose is to make it easier for person to rearrange html/css to any liking, without worrying about copying inputs/outputs.
If utilizing services, will that leave with strongly typed components, where parent and child are too connected? Prefer smart-dumb architecture strategy, if that is possible with services or not.
Inputs andOutputs in the parent component code, would you consider that the components are less tightly coupled than by using a service?