Node.js 与GPS漫游器的角度连接-与节点的角度连接。js
这是角度上的误差: 无效的配置对象。已使用与API架构不匹配的配置对象初始化网页包 这是我读到的联系:Node.js 与GPS漫游器的角度连接-与节点的角度连接。js,node.js,Node.js,这是角度上的误差: 无效的配置对象。已使用与API架构不匹配的配置对象初始化网页包 这是我读到的联系: import { Injectable } from '@angular/core'; import {HttpClient} from '@angular/common/http'; import { Observable } from 'rxjs'; import { Student } from '../data/student'; @Injec
import { Injectable } from '@angular/core';
import {HttpClient} from '@angular/common/http';
import { Observable } from 'rxjs';
import { Student } from '../data/student';
@Injectable({
providedIn: 'root'
})
export class StudentService {
url = 'http://localhost:8100'
constructor(private http: HttpClient) {}
getStudents():Observable<Student[]>{
return this.http.get<Student[]>(`${this.url}/studentsList`);
}
}
从'@angular/core'导入{Injectable};
从'@angular/common/http'导入{HttpClient};
从“rxjs”导入{Observable};
从“../data/Student”导入{Student};
@注射的({
providedIn:'根'
})
出口班学生服务{
url='1〕http://localhost:8100'
构造函数(私有http:HttpClient){}
getStudents():可观察{
返回this.http.get(`${this.url}/studentsList`);
}
}