ionic3

Ionic 2, ion-content of subcomponent overlapped by ion-header

Deadly 提交于 2019-12-12 05:08:48
问题 I have a page with an <ion-segment> that I use as a Tab to switch between showing two different custom components: <ion-header> <ion-navbar> <ion-title>Page</ion-title> </ion-navbar> <ion-toolbar> <ion-segment [(ngModel)]="tab"> <ion-segment-button value="section1"> Section 1 </ion-segment-button> <ion-segment-button value="section2"> Section 2 </ion-segment-button> </ion-segment> </ion-toolbar> </ion-header> <section1 *ngIf="tab === 'section1'"></section1> <section2 *ngIf="tab === 'section2'

ionic3 - Apple Mach -O Linker (Id) Error?

旧城冷巷雨未停 提交于 2019-12-12 04:59:29
问题 This is the all error showing: Apple Mach -O Linker (Id) Error? "Linker command failed with exit code 1 (use -v to see invocation). After I install OneSignal plugin in my ionic3 project, haven't setup all , When I tried to run my project in my device, this error coming out. And when I open .xcworkspace file, two project showing to me. First one is my real project, last one is after I install OneSignal plugin and install sudo gem install cocoapods, pod repo update then showing Just now I tried

Ionic 3 Angular 4 ion-icon (click) not getting fired

ぐ巨炮叔叔 提交于 2019-12-12 04:36:07
问题 get into a bit strange issue, exactly as the topic says - (click) is not getting fired. html: <ion-scroll scrollX="true"> <ion-row nowrap class="photoBlock"> <div *ngFor="let img of base64Images" class="scroll-item"> <ion-icon name="close-circle" class="icon-delete-img" color="light-grey" (click)="deletePicture()"></ion-icon> <img src="{{img}}"> </div> <div class="scroll-item"> <ion-icon name="close-circle" class="icon-delete-img" color="light-grey" (click)="deletePicture()"></ion-icon> <img

Cannot find module @angular/common/http Ionic 3 app

被刻印的时光 ゝ 提交于 2019-12-12 04:18:11
问题 I have done the Ionic 3 app's internationalization using ngx-translate .It gave me below error. I have done that using official doc here. Cannot find module '@angular/common/http' 回答1: The issue was @angular/common/http is only available in angular 4.3+ .But on Ionic 3 we're using Angular 4.1.3 . So this is the solution: I have removed @ngx-translate/http-loader npm uninstall @ngx-translate/http-loader --save And add an older version of it: npm i @ngx-translate/http-loader@0.1.0 --save You

Ionic3 / Angular2 view render multiple time

一笑奈何 提交于 2019-12-12 01:57:28
问题 I created a new ionic 3 project. In my HomePage , i have only one varible and one function: count = 0; printLog() { console.log("count", ++this.count); } In template home.html i call this function by interpolation binding: {{printLog()}} It is my whole code. In the console i see the log: As we can see the printLog function were called 9 times. I can't understand why. Can someone tell me why and how does it work? Many thanks! 来源: https://stackoverflow.com/questions/44402257/ionic3-angular2

How do I send local notifcation in Ionic 3?

不打扰是莪最后的温柔 提交于 2019-12-12 01:49:01
问题 I'm creating an Ionic 3 application and I need to schedule local notifications. I am just trying to set up a test notification but I can't seem to get it to work. I have tried in an emulator but nothing happens. The LocalNotifications plugin has also been added to my app.module.ts file. Here's my typescript file imports and function: import { Component } from '@angular/core'; import { NavController, NavParams, Platform, AlertController } from 'ionic-angular'; import { LocalNotifications }

How to navigate Page without Top Tabs App.components root

耗尽温柔 提交于 2019-12-12 00:54:31
问题 I'm using Ionic 3 , VS code IDE recently I came issue regards navigation to setRoot from root Tab page to another page (Home Page) without Top Tabs how could I achieve ? app.component.ts import { UserTabsPage } from '../pages/user-tab/user-tabs'; export class MyApp { rootPage:any = UserTabsPage; constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) {} } UserTabsPage.ts export class UserTabsPage { tab1Root = UserLoginPage; tab2Root =LoginPage; constructor() { } }

How to go back multiple pages in ionic 3

ぃ、小莉子 提交于 2019-12-11 19:53:17
问题 I have the page flow like below: A->B->C->D Somehow I will do a function in page"D", after it need to go back page"B". How can I achieve that? Using .pop() just can go back one page. Using .push(B) is also not the solution, because the flow will become: A->B->C->D->B The solution I want is: A->B Anyone know how to achieve it? Thanks a lot. 回答1: this.navCtrl.popTo(this.navCtrl.getByIndex(this.navCtrl.length()-(N+1))); Where N is the number of pages that you want to go back. So if you want to

Acess component variable inside onClick function of Chart Js

感情迁移 提交于 2019-12-11 19:12:46
问题 I have the following component, but I can't print test variable value inside onClick function of Chart. export class EntradaSaidaComponent { @ViewChild('graficoDeBarraTemplate') private graficoDeBarraTemplate; graficoDeBarra: Chart; test:any = "Test"; ngOnInit(){ this.graficoDeBarra = new Chart(this.graficoDeBarraTemplate.nativeElement, { type: 'bar', data: { labels: ["Entrada", "Saída"], datasets: [ { backgroundColor: ["#00b050", "#00b0f0"], data: [this.dashboard.totalReceber, this.dashboard

How to type text by cypress cy.type in <ion-input> Input type?

老子叫甜甜 提交于 2019-12-11 19:08:33
问题 < ion-input data-cy="email" type="email" class="border" placeholder="EMAIL"> If I do var typedText = 'test@email.com' cy.get('[data-cy=email]') .type(typedText,{ force: true }) .should('have.value',typedText) the test run shows error like CypressError: cy.type() failed because it requires a valid typeable element. 回答1: var typedText = 'test@email.com' cy.get('[data-cy=type-email]>[data-cy=type-email]') .type(typedText) .should('have.value',typedText) OR var typedText = 'test@email.com' cy.get