Привет всем помогите
<ion-button class="hf" (click)="getServicesByCategory(
parent.id)">
По клику на кнопку надо передать в запрос id
getServicesByCategory(id: number){
let self = this;
self.api.showMask()
.then(() => {
self.api.getCategory(
this.id)
.then((response: any) => {
console.log(id)
self.api.hideMask()
.then(() => {
self.services = response;
self.selectCategory();
console.log(response)
});
});
});
}
соотвеевнно и сюда
getCategory (id: number) {
return this.doRequest('GET',
/cat?category_parent_id=${id}
, {});
}
Что бы вернуть с бэка
this.id = navParams.get('id');
NullInjectorError: No provider for NavParams!
В провадер доабвллял навпарамтер выдает другую ошибку
Что не ковсем даным нав параметр получил доступ