나는 스택 MEAN에 비교적 익숙하고 여전히 배우고 있습니다.평균 스택 문제
내가 어디에서 오류인지 알 수 없습니다.이 부분은 오류가 있습니다.이 부분은에서 나와 있습니다. 아마 내 경로가 내가 얻을 수 없기 때문에 옳지 않아, 내가 그것을이다 오류의 종류를 모르는 :
import { ApplicationService } from './../../services/applicationService/application.service';
import { Component, OnInit } from '@angular/core';
@Component({
selector: "cc-search",
templateUrl: "./search.component.html",
styleUrls: ["./search.component.css"]
})
export class SearchComponent implements OnInit {
applications = [];
constructor(private applicationService: ApplicationService) {}
ngOnInit() {}
searchApplications(searchData) {
this.applicationService
.searchApplication(searchData)
.subscribe(
data => this.applications = data,
error => console.error(error)
);
}
}
및 서버 측에서
: 여기 내 오류의 OUPUT입니다 정보. 사전Type '() => any' is not assignable to type 'any[]'.Property 'push' is missing in type '() => any'.
있다고 가정 : 당신은 명시 적으로 결과의 유형을 지정해야합니까? 어떤 라인 번호. 그것을 참조합니까? –
에 대한 각도는 다음과 같습니다 : data => this.applications = data, – AznYouth
searchApplication 메소드의 정의를 추가합니다. –