isAllSelected(selection, dataSource) {
const numSelected = selection.selected.length;
const numRows = dataSource.data.length;
return numSelected === numRows;
}
ngOnInit() { myService.str.next('222') }
constructor(public myService: MyService) {
myService.str.subscribe(value => {this.someLocalProperty = value })
}