componentA.ts
@Input() array;
<input type="checkbox" [checked]="array | contains: value"/>
<label>{{array.length}}</label>
componentB.ts
@Component({
selector: 'app-component-b',
templateUrl: './app.component-b.html'
})
export class AppComponentB {
array = [1, 2, 3];
}
I am updating arrayin some other components. While labelupdating the length of the array correctly, the checkbox does not seem to be updating. contains- this is just a simple channel that checks if it is a valuepart array. I put a console.login the tube containsand got the result only on the first page, not when changing array. Why is this?
Thank..
source
share