In my angular 13 app I am using "rxjs": "^7.5.2". I am using switchMap from 'rxjs/operators', I am getting an error saying Property 'switchMap' does not exist on type 'Observable' when I do an ng build. How can I resolve this, any clue Here is the code.
getUserS() {
return this.api.get( 'rest/getusert')
.pipe(map(this.returnData));
}
returnData(res: Response){
return res.json();
}
initGetUsers() {
this.getUserS() {
.pipe(switchMap(res => {
console.log(res);
})).subscribe(
res =>{
console.log(res);
};
},
err => {
console.error( err );
},
() => {
}
)
}