I'm just trying to use the map function but it throws an error.Inside the results.map(results => etc) it says that 'Symbol Map cannot be properly resolved, probably it is located in inaccessible module'
import { Component, OnInit } from '@angular/core';
import { take, map,filter, tap } from 'rxjs/operators';
etc
@Component({
selector: 'app-test',
templateUrl: './test.component.html',
styleUrls: ['./test.component.css']
})
export class TestComponent implements OnInit {
public project: IProject;
constructor(
private appSer: AppService) { }
public ngOnInit(): void {
this.appSer.project$
.pipe(
take(1),
map(results =>
results.map(result => ({
...result,
square: result.square * 5000
})))
)
.subscribe(
(result: IProject) => {
console.log(result);
},
(error: any) => {
console.error(error);
},
);
}
}
