ionic3

Can't resolve all parameters for Modal: (?, ?, ?)

核能气质少年 提交于 2019-12-11 07:23:40
问题 import { Component, Inject } from '@angular/core'; import { NavController, Modal } from 'ionic-angular'; import { PopupPage } from '../../components/modal/modal.page'; @Component({ templateUrl: 'build/pages/spot/spot.html', providers: [ Modal ] }) export class SpotComponent { constructor(@Inject(Modal) private modal: Modal ) {} } 回答1: Just like @Pace commented, you can take a look at Ionic2 docs to see how to create a Modal . You don't have to include it in the providers array or in your

Cannot create routes on Ionic 3

核能气质少年 提交于 2019-12-11 07:07:34
问题 I want to see the actual route on the url but I can't figure out what I need to change exactly. I'm following the docs here: https://ionicframework.com/docs/api/navigation/IonicPage/ but I get this error: ...home.ts has a @IonicPage decorator, but it does not have a corresponding "NgModule" at... I have this on the top of my page: @IonicPage({ name: 'sums-home', segment: 'sums-home' }) I created the home.module.ts file with this code: import { NgModule } from '@angular/core'; import {

IONIC Autocomplete option in search text not disappearing after selection

扶醉桌前 提交于 2019-12-11 06:47:54
问题 I have two segments on my page that switches the selection list on the page upon toggling them <ion-segment [(ngModel)]="changeCart" color="primary"> <ion-segment-button value="includeSeg" (ionSelect)="onSetEnclude()"> <ion-icon name="add"></ion-icon> </ion-segment-button> <ion-segment-button value="excludeSeg" (ionSelect)="onSetExclude()"> <ion-icon name="remove"></ion-icon> </ion-segment-button> </ion-segment> Under this segment there were two respective search tool bar which will be

Ionic 3 iOS build --prod Not Working: Declarations of 2 Modules Error

只愿长相守 提交于 2019-12-11 06:39:36
问题 I have ruthlessly tried to build my Ionic 3 app for production using several different methods. Attempts Firstly I imported enableProdMode from Angular and called enableProdMode in my app.component.ts constructor. In turn, I got a blank screen when I built the app. I decided that this was an unnecessary step, as the Ionic Framework documentation suggested that I simply run ionic cordova build ios --prod to get a production build. In turn, I got the following errors. Errors After running the

ionic require login on lazy loaded page for website

岁酱吖の 提交于 2019-12-11 05:33:31
问题 I have a simple Ionic3 app with a couple of lazy loaded pages (using IonicPage ) and a login page. I want to block all access to any page unless the user is first logged in. Knowing that this is to build a website version and not a cordova version, what is the best way to prevent the user for simply typing in the url of the lazy loaded pages and access them without logging in? I'm guessing there must be some way to "tap" into the navigation and redirect to the login page from there but cannot

Ionic App Availability plugin getting Error Object (…) is not a function

天涯浪子 提交于 2019-12-11 05:22:25
问题 I am trying to implement App Availability Feature in ionic. I have an app installed in my device and trying to check if that app exists from another app. But facing an issue in the same, getting the below error 回答1: Possibly you are facing mismatch of ionic version of app and the plugin version you installed in your app. In Ionic V3 you no need to import from '../ngx'; Ionic V3 and V4 have Different plugin url Ionic v3 plugins Ionic v4 plugins. For Ionic v3 App availability ionic cordova

Unauthorized response with valid token

我的未来我决定 提交于 2019-12-11 05:18:36
问题 I get unauthorized as response on every request after login successfully this is some of my code (let me know if you need to see anything else): Data provider on ionic this.storageProvider.getToken().then(results => { this.httpOptions = { headers: new HttpHeaders({ 'Content-Type': 'application/json', 'Authorization': 'Bearer ' + results, 'Accept': 'application/json', }) }; }); public getTodayReservations() { //all reservations (not todays only) let _url = this.url + '/guides/reservations/all'

How to use the AngularFireList to display list in html

拥有回忆 提交于 2019-12-11 05:09:18
问题 I am able to save to firebase but could not retrieve the items as a list. It gives me the error as such: Uncaught(in promise): Error: InvalidPipeArgument'[Object.Object]' for pipe 'AsyncPipe' ... I am following a tutorial that still uses the FirebaseListObservable. But I can't get it to work since it is depecrated. Using the AgularFireList, I cant't list the items. Below is how I try to retrieve the items from firebase to Ionic app: import { AngularFireDatabase, AngularFireList } from

Wait till all the promises are resolved / Firestore

天涯浪子 提交于 2019-12-11 04:27:20
问题 Could you tell how to wait till all the promises are resolved? At this moment it moves to next line without completing below operation. I need to fully complete the foreach and after that move to the next line.So how can I do it? forEach(project.projectDetail.memberList, async (m) => { const memberDocumentRef: firebase.firestore.DocumentReference = this.fireStore.doc(`members/${m.id}`).ref; await this.fireStore.firestore.runTransaction(transaction => { return transaction.get(memberDocumentRef

Ionic 3 Tabs on Modal

你。 提交于 2019-12-11 04:26:59
问题 I have implemented tabs on a modal. Here is the code: Pagewithmodal.ts getFoodInfo(food) { let foodModal = this.modalCtrl.create('TabspagePage', { Model: food, Api: this.api, Title: 'Food Infopedia' }); foodModal.onDidDismiss(option => { console.log(option); }); foodModal.present(); } TabspagePage.html <ion-tabs> <ion-tab tabIcon="heart" [root]="tabNutri" tabTitle="Nutritional" [rootParams]="model"></ion-tab> <ion-tab tabIcon="star" [root]="tabIngre" tabTitle="Ingredients" [rootParams]="model