У меня есть код в моем dashboard.component.ts, например:
this.scheduleService.getShiftSchedule().subscribe((temp)=>{
this.api = temp;
var ids = [['user_id', 1], ['status', 2]],
result = temp.map(o => ids.map(([key, id]) => ({ id, content: o[key] })));
this.tablePresetData = result;
})
и библиотека импорта:
import { Component, OnInit, ViewEncapsulation, ViewChild } from '@angular/core';
import { TicketService } from '../../ticket.service';
import { ScheduleService } from '../../schedule.service';
import {Chart} from 'chart.js';
import { Injectable } from '@angular/core';
import { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest } from '@angular/common/http';
import { map, filter, switchMap } from 'rxjs/operators';
Были ли какие-либо ошибки, которые я допустил при написании этого кода?или я просто что-то забыл?