执行一个又一个功能已完成
这就是我试过的
ngOnInit () {
this.subscriptions.add(
this.route.params
.subscribe(params => {
this.truckdetails = params;
this.getChecklistCategory();
})
)
}
getChecklistCategory(){
this._checklistCategoryProvider.getAll()
.subscribe(
res=>{
console.log("got data here") //this is never executed
///this.checklists = res //this outputs data in frontend
},
err=>{
console.log("error is here")//this is not executed
}
)
}
第二个函数永远不会执行检查res和错误
我哪里错了?