ngxtension / ngxtension-platform

Utilities for Angular

Home Page:https://ngxtension.netlify.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

eneajaho opened this issue · comments

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

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));
}