前几天我用Angular 4
构建了我的Spring Boot
和npm run build
应用,一切正常,但现在我收到了这样的错误:
ERROR in Can't resolve all parameters for DataService in C:/Users/Michał/IdeaProjects/Inventory/src/main/frontend/src/app/services/data.service.ts: (?, [object Object]).
ERROR in ./src/main.ts
Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in 'C:\Users\Michał\IdeaProjects\Inventory\src\main\frontend\src'
@ ./src/main.ts 3:0-74
@ multi ./src/main.ts
我的data.service
班看起来:
@Injectable()
export class DataService {
constructor(private url: string, private http: HttpClient) { }
getAllWithPaging(params: HttpParams){
return this.http.get(this.url + '/withPaging?' + params.toString());
}
insertOrUpdate(resources){
return this.http.post(this.url, resources);
}
delete(resources){
return this.http.delete(this.url + '/' + resources.id, {responseType: 'text'});
}
get getUrl() : string{
return this.url;
}
get getHttp(): HttpClient{
return this.http
}
自一周以来发生了什么变化?