错误输入:无法在/tmp/build_b7eed86c18aa452fb03d88946e269f3a/toshikverma-rentitnow-df48c05/src/app/services/data.service.ts中解析DataService的所有参数:(?,[object Object])。
循环依赖(已检查)
@Injectable()(选中)
这是我的数据服务类
import { BadInput } from './../common/bad-input';
import { NotFoundError } from './../common/not-found-error';
import { AppError } from './../common/app-error';
import { Http } from '@angular/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/catch';
import 'rxjs/add/operator/map';
import 'rxjs/add/observable/throw';
@Injectable()
export class DataService {
constructor(private url: string, private http: Http) { }
getAll(obj) {
return this.http.post(this.url+"/get",obj)
.map(response => response.json())
.catch(this.handleError);
}
customQuery(query) {
console.log(this.url+"/dynamic/"+query);
return this.http.get(this.url+"/dynamic/"+query)
.map(response => response.json())
.catch(this.handleError);
}
}
我在这里使用DataService类
import { Injectable } from '@angular/core';
import { DataService } from "./data.service";
import { Http } from "@angular/http";
@Injectable()
export class ReasonsService extends DataService {
constructor(http: Http) {
super("xxx/v1/reasons", http);
}
}
我已经完成了类似问题here和here上提到的答案,但没有帮助我,我不知道在这里做了什么错误,一切都在当地工作正常系统,但使用
在heroku上部署时出错 "postinstall": "ng build --aot -prod",
任何帮助都会非常感谢