Я просто пытаюсь использовать функцию карты, но она выдает ошибку. Внутри файла results.map (results => et c) говорится, что «Карта символов не может быть правильно разрешена, возможно, она находится в недоступном месте. модуль '
, ![enter image description here](https://i.stack.imgur.com/eouH3.png)
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);
},
);
}
}