@Input detec chenge

PHOTO EMBED

Tue Jan 03 2023 06:07:16 GMT+0000 (Coordinated Universal Time)

Saved by @ilivanilton #angular #rxjs-pattern

    private _categoryId: string;
    
    @Input() set categoryId(value: string) {
    
       this._categoryId = value;
       this.doSomething(this._categoryId);
    
    }
    
    get categoryId(): string {
    
        return this._categoryId;
    
    }
content_copyCOPY

https://stackoverflow.com/questions/38571812/how-to-detect-when-an-input-value-changes-in-angular