ngxtension / ngxtension-platform

Utilities for Angular
https://ngxtension.netlify.app/
MIT License
544 stars 80 forks source link

Migrate to model instead of input, if the input is being used inside two way binding or the input value is being changed inside the component #373

Open eneajaho opened 2 months ago

draylegend commented 2 months ago

Will the following code be migrated, too?

@Input()
value: string;

change() {
  ...subscribe(v => (this.value = v));
}

would become

value = model<string>();

change() {
  ...subscribe(v => this.value.set(v));
}