Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all 49308 articles
Browse latest View live

Missing Document Configuration warning when publishing to Apple appstore

$
0
0

@bensnape wrote:

When I publish my ionic 3 app to the apple appstore, I always get the warning below:

Missing Document Configuration - By declaring the CFBundleDocumentTypes key in your app, you’ve indicated that your app is able to open documents. Please set the UISupportsDocumentBrowser key to “YES” if your app uses a UIDocumentBrowserViewController. Otherwise, set the LSSupportsOpeningDocumentsInPlace key in the Info.plist to “YES” (recommended) or “NO” to specify whether the app can open files in place. All document-based apps must include one of these configurations. For more information, visit https://developer.apple.com/document-based-apps/.

Any idea how to fix this and stop the warning from happening every time I publish to the app store?

Posts: 1

Participants: 1

Read full topic


Trouble with Http get

$
0
0

@pmck55 wrote:

been trying for 2 days to send a HTTP get request with basic Authorisation. it is being encoded fine and It works on API’s which don’t require Authorisation. The encoding works fine but for some reason I am messing up somewhere. I gives me these errors -

  1. SEC7120: [CORS] The origin ‘http://localhost:8100’ did not find ‘http://localhost:8100’ in the Access-Control-Allow-Origin response header for cross-origin resource at ‘https://api.testsapp.com:8342/v1/shop?limit=10&wholesaler=0’.

  2. HTTP401: DENIED - The requested resource requires user authentication. (XHR)GET - https://api.testsapp.com:8342/v1/shop?limit=10&wholesaler=0

home.page.ts

import { Component } from ‘@angular/core’;
import { HttpHeaders } from ‘@angular/common/http’;
import { HttpClient } from ‘@angular/common/http’;
import { utf8Encode } from ‘@angular/compiler/src/util’;

@Component({
selector: ‘app-home’,
templateUrl: ‘home.page.html’,
styleUrls: [‘home.page.scss’]
})
export class HomePage {
constructor(private http: HttpClient) {}

get() {
const headersObject = new HttpHeaders();
let test = utf8Encode(btoa(‘username:password1234’));

console.log(test);

headersObject.append('Authorization', 'Basic ' + test);

const httpOptions = {
  headers: headersObject
};

this.http.get('https://api.testsapp.com:8342/v1/shop?limit=10&wholesaler=0', httpOptions)
  .subscribe(response => {
    console.log(response);
  });

}
}

Posts: 1

Participants: 1

Read full topic

Ionic 4 + vue.js / ion-button not clickable when using ion-tabs

$
0
0

@HassBrot wrote:

I am using in my package.json:

  • @ionic/core: “^4.0.3”,
  • @ionic/vue: “0.0.4”,
  • vue: “^2.6.10”,
  • vue-router: “^3.0.6”
    furthermore:
  • I’m using the IonVueRouter from @ionic/vue

I’ve wrote an IonVuePage component, which has two other components, the HeaderSection (), and the TabBar (). Between those components I’ve added a Tag, to add other components inside of this default layout.
However, If I am using a simple ion-button inside a new component (e.g. Home component), which is inside the Tag of the IonVuePage component it is not clickable until:

  1. I Wrap it inside of a Tag, or
  2. I remove the TabBar component of the IonVuePage component.

What could explain that behaviour?

Do I have my mistake in combining of and IonVueRouter? Can I use both?

I’ve noticed, that the

where the TabBar is placed in is overlying:

Here’s my code:

IonVuePage component:

<template>
  <ion-page
    class="ion-page"
    main>
    <header-section
      :title="title"
      :show-back-button="showBackButton"/>
    <slot name="content"/>
    <tab-bar/>
  </ion-page>
</template>

<script>
import TabBar from '@/components/page/TabBar';
import HeaderSection from '@/components/page/HeaderSection';

export default {
  name: 'IonVuePage',
  components: {
    TabBar,
    HeaderSection,
  },
...

TabBar component:

<template>
  <!-- Listen to before and after tab change events -->
  <ion-tabs
    @IonTabsWillChange="beforeTabChange"
    @IonTabsDidChange="afterTabChange">

    <ion-tab
      tab="home"/>
    <ion-tab
      tab="request"/>

    <template slot="bottom">
      <ion-tab-bar >

        <ion-tab-button tab="home">
          <ion-icon name="home"/>
          <ion-label>Schedule</ion-label>
          <ion-badge>6</ion-badge>
        </ion-tab-button>

        <!-- Provide a custom route to navigate to -->
        <ion-tab-button tab="request">
          <ion-icon name="contacts"/>
          <ion-label>Request</ion-label>
        </ion-tab-button>

      </ion-tab-bar>
    </template>
  </ion-tabs>
</template>

Home component:

<template>
  <ion-vue-page
    :title="welcometext"
    :show-back-button="true">
    <ion-content slot="content">

      <ion-button @click="changeToRequest">change to request page!</ion-button>

      <ion-buttons>
        <ion-button
          fill="solid"
          @click="showModal">show modal! </ion-button>
      </ion-buttons>

    </ion-content>
  </ion-vue-page>
</template>
  },
...

App.vue:

<template>
  <div id="app">
    <ion-app>
      <ion-vue-router />
    </ion-app>
  </div>
</template>

<script>
export default {
  name: 'App',
};
</script>

router.js:

import Vue from 'vue';
import { IonicVueRouter } from '@ionic/vue';
import Home from '@/views/Home';

Vue.use(IonicVueRouter);

export default new IonicVueRouter({
  mode: 'history', // for not having the # in the URL
  routes: [
    {
      path: '/',
      redirect: '/home',
    },
    {
      path: '/home',
      name: 'Home',
      component: Home,
    },
    {
      path: '/request',
      name: 'Requet',
      component: () => import('@/views/TestRequest'),
    },
  ],
});

I appreciate any kind of help or advise.
Kind regards

Posts: 1

Participants: 1

Read full topic

Angularfire2 error

$
0
0

@ariff23 wrote:

why this problem after install ```
npm install rxjs@6 rxjs-compat@6 promise-polyfill --save

![3|361x500](upload://daLCdU0gIy8uRUOi4sE96YXZag3.jpeg)

Posts: 1

Participants: 1

Read full topic

Ionic horizontal reordering list

$
0
0

@cinghiale wrote:

Hi!
I am developing a simple ionic v4 application, and I have created this simple ionic reordering list:

<ion-list>
   <ion-reorder-group (ionItemReorder)="reorderItems($event)" disabled="false">
       <ion-item *ngFor="let item of items">
           <ion-label>
              {{item}}
           </ion-label>
           <ion-reorder slot="end"></ion-reorder>
       </ion-item>
   </ion-reorder-group>
</ion-list>

Is there a way to show horizontally the items inside the list instead of the typical vertical style, with the possibility to horizontally reorder the item inside the list?

Posts: 1

Participants: 1

Read full topic

Ionic 4 angular 6 scrollable global header

$
0
0

@colinshonaman wrote:

I’ve been attempting this for an entire day and can’t figure out what to do. I need to have a header that displays on every page, but scrolls with the content.

I included the header in app.html but the content scrolls and the header is always on screen.

I put the component in every page, but it isn’t using the same instance of the component which gives lag as there is content that has to be loaded on the header based on your login status. Ex: I go to page one and click page two. I click the sign in button, and it now displays “logged in”. Then I click page 2 and it says sign in for 1/10 of a second and then updates which looks bad.

Thanks!

Posts: 1

Participants: 1

Read full topic

CORS issue only in some devices

$
0
0

@fgcoronel wrote:

Hello, I have a problem with CORS and I can’t resolve it.
I did an application and works perfect in android mid-range devices, but some top devices not do login because CORS error.
Please, someone knows how fix it?

Posts: 1

Participants: 1

Read full topic

Shadow DOM - Why?

$
0
0

@javasol wrote:

I migrated my app from Ionic 3 to 4 and for the most part I see slightly better performance and it seems like it’s pretty stable. The only real issue I have is why did Ionic switch to use shadow DOM? I know it’s being used in other libraries but still it seems like this added a huge restriction on customization. I’ve been struggling to customize any Ionic component and it seems like there is very little gained by this

Issues I’ve been struggling with

  1. Expand ion-select and ion-select-option to display all text and not have an ellipses at the end

  2. I have a list of ion-item-sliding items that for some of them I want to hide the sliding arrow. Is this feasible? I put disabled=true but it still displays the icon, which is a little misleading

  3. is there a way to change the color of the arrow icon? Right now it’s a grayish color and I would rather change it to black so that users don’t think it’s disabled

Posts: 1

Participants: 1

Read full topic


Ionic working on browser but not working on real device

$
0
0

@mustafabekec wrote:

I want to add FCM Notification in my ionic project. My project working succesfull in browser. But it not working on device. When i run cordova run android , app installed the phone. But the application is stopped. This event happened after installing the FCM add-in. https://github.com/fechanique/cordova-plugin-fcm plugin I tried another plugin, but the result didn’t change. https://ionicframework.com/docs/v3/native/fcm/ I want to look at Inspect Devices if there is an error. But it closes quickly, I can’t see any errors.

It also works successfully from the phone when I delete the plug-in.

How can I solve this problem?

I tried cordova platform remove android and cordova platform add android but not working still.

cordova run android

Android Studio project detected
Discovered saved plugin "mx.ferreyra.callnumber". Adding it to the project
Plugin "call-number" already installed on android.
ANDROID_HOME=C:\Users\Meftun\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_131
studio
Subproject Path: CordovaLib
Subproject Path: app
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
config.xml
../config.xml
../../config.xml
../../../config.xml
preference = 9
name = ScrollEnabled, value = false
name = android-minSdkVersion, value = 19
name = BackupWebStorage, value = none
name = SplashMaintainAspectRatio, value = true
name = FadeSplashScreenDuration, value = 300
name = SplashShowOnlyFirstTime, value = false
name = SplashScreen, value = screen
name = SplashScreenDelay, value = 3000
name = GOOGLE_MAPS_ANDROID_API_KEY, value = XXXXXXXXXXXXXXXXXXXXXXXX
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
        at build_6lv694c3ptnyjchvmgsyczu8h.run(C:\Users\Meftun\Desktop\IonicAktif\kurye-musteri2\kurye-musteri\platforms\android\app\build.gradle:154)
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:compileDebugAidl UP-TO-DATE
:CordovaLib:compileDebugRenderscript UP-TO-DATE
:CordovaLib:checkDebugManifest UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:prepareLintJar UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:platformAttrExtractor UP-TO-DATE
:CordovaLib:processDebugManifest UP-TO-DATE
:CordovaLib:processDebugResources UP-TO-DATE
:CordovaLib:generateDebugSources UP-TO-DATE
:CordovaLib:javaPreCompileDebug UP-TO-DATE
:CordovaLib:compileDebugJavaWithJavac UP-TO-DATE
:CordovaLib:processDebugJavaRes NO-SOURCE
:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug UP-TO-DATE
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:compileDebugAidl UP-TO-DATE
:CordovaLib:packageDebugRenderscript NO-SOURCE
:app:compileDebugRenderscript UP-TO-DATE
:app:checkDebugManifest UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:prepareLintJar UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:createDebugCompatibleScreenManifests UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:splitsDiscoveryTaskDebug UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:javaPreCompileDebug UP-TO-DATE
:app:compileDebugJavaWithJavac UP-TO-DATE
:app:compileDebugNdk NO-SOURCE
:app:compileDebugSources UP-TO-DATE
:CordovaLib:mergeDebugShaders UP-TO-DATE
:CordovaLib:compileDebugShaders UP-TO-DATE
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets UP-TO-DATE
:app:mergeDebugShaders UP-TO-DATE
:app:compileDebugShaders UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:transformClassesWithStackFramesFixerForDebug UP-TO-DATE
:app:transformClassesWithDesugarForDebug UP-TO-DATE
:app:transformClassesWithDexBuilderForDebug UP-TO-DATE
:app:transformDexArchiveWithExternalLibsDexMergerForDebug UP-TO-DATE
:app:transformDexArchiveWithDexMergerForDebug UP-TO-DATE
:CordovaLib:compileDebugNdk NO-SOURCE
:CordovaLib:mergeDebugJniLibFolders UP-TO-DATE
:CordovaLib:transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE
:CordovaLib:transformNativeLibsWithIntermediateJniLibsForDebug UP-TO-DATE
:app:mergeDebugJniLibFolders UP-TO-DATE
:app:transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE
:app:processDebugJavaRes NO-SOURCE
:app:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
:app:validateSigningDebug
:app:packageDebug UP-TO-DATE
:app:assembleDebug UP-TO-DATE
:app:cdvBuildDebug UP-TO-DATE

BU�LD SUCCESSFUL in 12s
46 actionable tasks: 1 executed, 45 up-to-date
Built the following apk(s):
        C:\Users\Meftun\Desktop\IonicAktif\kurye-musteri2\kurye-musteri\platforms\android\app\build\outputs\apk\debug\app-debug.apk
ANDROID_HOME=C:\Users\Meftun\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_131
No target specified, deploying to device 'XXXXXXXXXXXXXXXXXXXXXXXX'.
none
Skipping build...
Built the following apk(s):
        C:\Users\Meftun\Desktop\IonicAktif\kurye-musteri2\kurye-musteri\platforms\android\app\build\outputs\apk\debug\app-debug.apk
Using apk: C:\Users\Meftun\Desktop\IonicAktif\kurye-musteri2\kurye-musteri\platforms\android\app\build\outputs\apk\debug\app-debug.apk
Package name: com.kuryemex.cebindekikurye
LAUNCH SUCCESS

ionic info

Ionic:

   ionic (Ionic CLI)  : 4.12.0 (C:\Users\Meftun\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework    : ionic-angular 3.9.3
   @ionic/app-scripts : 3.2.1

Cordova:

   cordova (Cordova CLI) : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms     : android 7.1.4
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 19 other plugins)

System:

   Android SDK Tools : 26.1.1 (C:\Users\Meftun\AppData\Local\Android\sdk)
   NodeJS            : v8.9.3 (C:\Program Files\nodejs\node.exe)
   npm               : 6.9.0
   OS                : Windows 10

cordova plugin list

call-number 0.0.2 "Cordova Call Number Plugin"
com-sarriaroman-photoviewer 1.1.18 "PhotoViewer"
cordova-background-geolocation-lt 2.14.2 "BackgroundGeolocation"
cordova-open-native-settings 1.5.2 "Native settings"
cordova-plugin-advanced-http 2.0.9 "Advanced HTTP plugin"
cordova-plugin-android-permissions 1.0.0 "Permissions"
cordova-plugin-app-version 0.1.9 "AppVersion"
cordova-plugin-background-fetch 5.4.1 "CDVBackgroundFetch"
cordova-plugin-camera 4.0.3 "Camera"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-fcm 2.1.2 "FCMPlugin"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-file-transfer 1.7.1 "File Transfer"
cordova-plugin-googlemaps 2.6.2 "cordova-plugin-googlemaps"
cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 3.1.2 "cordova-plugin-ionic-webview"
cordova-plugin-nativegeocoder 3.2.1 "NativeGeocoder"
cordova-plugin-request-location-accuracy 2.2.3 "Request Location Accuracy"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-uniquedeviceid 1.3.2 "UniqueDeviceID"
cordova-plugin-whitelist 1.3.3 "Whitelist"

Posts: 3

Participants: 2

Read full topic

Component in page not working in ionic 4

$
0
0

@krima wrote:

what i want to do is i have list with 3 items in new page and clicking of each appears respective component screen. I’ve
tried only one and it’s not showing not i’m able to click it also. What to do?

new.page.html

Profile {{p.title}}

new.page.ts

import { Component, OnInit } from ‘@angular/core’;
import { GroupComponent } from ‘src/app/component/group/group.component’;
import { Router } from ‘@angular/router’;
import { NavController } from ‘@ionic/angular’;

@Component({
selector: ‘app-new’,
templateUrl: ‘./new.page.html’,
styleUrls: [’./new.page.scss’],
})
export class NewPage implements OnInit {
// public ages = [
// { title: ‘Home’, Component: GroupComponent, icon: ‘home’ },

// ];
constructor(private router: Router,public navCtrl: NavController) { }

ngOnInit() {
}
openPage§ {

//this.router.na(p.Component);
//this.navCtrl.navigateForward('/Groomponent');

}
}

component.module.ts

import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from ‘@angular/core’;
import { CommonModule } from ‘@angular/common’;
import { SwitchControlComponent } from ‘./switch-control/switch-control.component’;
import { PanelControlComponent } from ‘./panel-control/panel-control.component’;
import { IonicModule } from ‘@ionic/angular’;
import { PipesModule } from ‘…/pipes/pipes.module’;
import { FanControlComponent } from ‘./fan-control/fan-control.component’;
import { FormsModule } from ‘@angular/forms’;
import { GroupComponent } from ‘./group/group.component’;
// import { DeviceComponent } from ‘./device/device.component’;

@NgModule({
declarations: [SwitchControlComponent,
PanelControlComponent,
FanControlComponent,

GroupComponent

],
imports: [
CommonModule,
IonicModule,
PipesModule,
FormsModule
],
exports: [
SwitchControlComponent,
PanelControlComponent,
FanControlComponent,
GroupComponent
],
schemas: [ CUSTOM_ELEMENTS_SCHEMA ]
})
export class ComponentModule { }

group.component.ts

import { Component, OnInit } from ‘@angular/core’;

@Component({
selector: ‘app-group’,
templateUrl: ‘./group.component.html’,
styleUrls: [’./group.component.scss’]
})
export class GroupComponent implements OnInit {

constructor() { }

ngOnInit() {
}

}

group.component.html



Title

Posts: 1

Participants: 1

Read full topic

Click action is not working in ion-slide using ionic3

$
0
0

@vandanapalgiri wrote:

Implemented ion-slides dynamically with autoplay:

  1. if we enable autopaly click actions are not working inside the first slide if there are buttons to click,
  2. But Click event is working fine without autoplay for the same first-slide.

This is my code:

*<div ngIf=“flashCards && flashCards.cards && flashCards.cards.length>0”>

  • <ion-slides #slides pager=“true” style=“width: 100%; height: auto; margin-top: 0%;margin-bottom: -1%”*
  •  *ngIf="showFlashCardBlogger">*
    
  •  <ion-slide *ngFor="let flashCard of flashCards.cards;let idx=index">*
    
  •    <ion-card class="carousel_1" style="    padding-bottom: 0px;">*
    
  •      <img style="border-radius: 0;width: 100%;height:250px;" [src]="flashCard.flash_image">*
    
  •      <div>*
    
  •        <ion-row style="position: absolute;top: 10px;width:94%;" class="carousel_row">*
    
  •          <ion-col col-1></ion-col>*
    
  •          <ion-col col-9>*
    
  •            <p style="color: #fff;*
    
  •        font-size: 2.2rem;line-height:1.1; margin-top: 4px;*
    
  •        ">{{flashCard.blogger_name}}<br><span*
    
  •                style="font-size: 1.9rem;">of {{flashCard.zone_name}}</span></p>*
    
  •          </ion-col>*
    
  •          <ion-col col-2>*
    
  •            <img src="assets/images/close_new.svg" (click)="removeFlashCard()" style="*
    
  •        width: 56%;margin-left: 19px;margin-top: -1px;">*
    
  •          </ion-col>*
    
  •        </ion-row>*
    
  •      </div>*
    
  •      <p class="carousel_text1">Find her blogs at <span style=" padding-top: 4%;*
    
  •        padding-bottom: 4%;color:#65A0E6"*
    
  •           (click)="goToFlashLink(flashCard.blog_url)">{{flashCard.blogShort_url}}*
    
  •          </span>*
    
  •        <br>*
    
  •        Connect with her personally, and hang out with <br> her other fans right here.</p>*
    
  •      <button ion-button class="carousel_enterZone_button" (click)="joinZoneTimeline(flashCard.zone_id)">GO TO HER ZONE</button>*
    
  •      <ion-card class="carousel_card1">*
    
  •        <button ion-button class="carousel_seeFeatured_button" (click)="featuredBloggers()">SEE ALL FEATURED*
    
  •          BLOGGERS</button>*
    
  •      </ion-card>*
    
  •    </ion-card>*
    
  •  </ion-slide>*
    
  • *
  • *

Thanks in advance.

Posts: 1

Participants: 1

Read full topic

Click action working on browser but doesn't on devapp

$
0
0

@elominate wrote:

I am testing an ionic 4 app in dev app. In a page modal, I want to call a function when a card is tap using the click function like this

<ion-card class="ion-no-margin" (click)="gmailReg()">
    <ion-card-content>
    <ion-item id="gmail">
        <ion-icon slot="start" name="logo-google" size="large"></ion-icon>
        Gmail
    </ion-item>
    </ion-card-content>
</ion-card>

When I test this in chrome browser, it works as expected but it doesn’t in devapp.

As an aside, all buttons in the app work perfectly on both chrome browser and devapp.

Is there a way to check why it behaves this way with devapp but works in chrome?

Posts: 1

Participants: 1

Read full topic

Styling ion-select-option

$
0
0

@martin-fisher wrote:

Does anyone have any access to the devel team to get some/all of the styling for ion-select-option set as variables, ie available through the shadow DOM? I need to change the overflow settings for async data and the only solution is a serious hack. I guess I should do what others have done and move to angular select/option instead, but that kind of misses the point of using Ionic.

Thx
Martin

Posts: 1

Participants: 1

Read full topic

Can't bind to 'cache' since it isn't a known property of 'ion-img'

$
0
0

@oliverandersen wrote:

when using the component, the documentation states that the input ‘cache’, can be used to specify whether the image should be cached.

However the title error appears nd this cannot be done.

any suggestions?

Posts: 1

Participants: 1

Read full topic

IONIC 4 Toast button color not changing for anything (bug?)

$
0
0

@SanduCuragau wrote:

Man I’ve seen like 3 topics about this and none helped, one even declared it is an unsolvable bug at the moment, but come on there must be something that could be done about it right now to get it done

All I want is the SIM button in the toast to be white, which if you notice has no role, the button with role “cancel” actually has the color I wanted, a tricky thing I tried was adding role “cancel” to the functional SIM button too and trying to handle it, but nevermind since the handler code won’t execute if I set role cancel to the SIM button, is there any other role I can add to it instead? Appearently buttons with roles get the color we want, buttons without it get the primary default color and we can’t change it, so I was wondering if there’s anything I could do about it, add some role to the SIM button that still let’s me handle it, something in css, or if there’s any other trick I could try to get this thing done

image

TS:

  async recuperarPassword() {
    const toast = await this.toastCtrl.create({
      header: 'Login incorreto!',
      message: 'Deseja recuperar a conta?',
      position: 'bottom',
      duration: 0,
      cssClass: 'customToast',
      buttons: [
        {
          side: 'start',
          text: 'SIM',
          handler: () => {
            // functional code that I want to execute here
          }
        }, {
          text: 'NÃO',
          role: 'cancel',
          handler: () => {
            // the toast just closes
          }
        }
      ]
    });
    toast.present();
  }

GLOBAL.SCSS

.customToast {
    text-align: center !important;
    --button-color: #ffffff;
    --max-height: 70px;
    --background: #f04141e8;
    --border-style:solid;
    --border-width :1px;
    --border-color:#d33939;
    // SHOULD be button color 
    --color:#ffffff !important; 
    color:#ffffff !important;
}

I’ve seen these but didn’t help

Posts: 1

Participants: 1

Read full topic


How to save picture using ionic camera preview

$
0
0

@ramprakashram wrote:

I am developing a mobile application using Ionic 4. Everything is working smoothly, but i could not save the picture when i call the function takePicture(). Does it have any parametes like saveToPhotoAlbum like Ionic Camera Plugin. Do help me out.


  cameraPictureOpts: CameraPreviewPictureOptions = {
    width: window.innerWidth,
    height: window.innerHeight,
    quality: 100
  }

  takePicture() {
    let result = this.cameraPreview.takePicture(this.cameraPictureOpts);
    let picture = `data:image/jpeg;base64,${result}`;
  }

Posts: 1

Participants: 1

Read full topic

White page

$
0
0

@scoppato72 wrote:

Hi everyone, I’m a junior developer and I’m having a big problem doing a very simple thing.
I created a blank page with the ionic start myApp tabs command.
Through the ionic serve command, display the page correctly on my browser.
Without doing anything else, I did the build, again from the command line.
At build time, I don’t get any errors.
I install the APP on my smartphone.
Launch the APP is the result is a blank page: nothing!
Below I indicate what the ionic info command gives me:

Ionic:

   ionic (Ionic CLI)             : 4.12.0 (/usr/local/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.3.1
   @angular-devkit/build-angular : 0.13.8
   @angular-devkit/schematics    : 7.3.8
   @angular/cli                  : 7.3.8
   @ionic/angular-toolkit        : 1.5.1

Cordova:

   cordova (Cordova CLI) : 6.0.0
   Cordova Platforms     : android 5.1.1
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.0.1, (and 4 other plugins)

System:

   NodeJS : v10.15.1 (/usr/local/bin/node)
   npm    : 6.9.0
   OS     : macOS High Sierra

Can anyone tell me what is wrong?
Thank you

Posts: 1

Participants: 1

Read full topic

Execution failed for task ':app:fabricGenerateResourcesDebug

$
0
0

@himeshalc wrote:

any one facing similar issues?
Execution failed for task ‘:app:fabricGenerateResourcesDebug’.

Crashlytics Developer Tools error.

Posts: 1

Participants: 1

Read full topic

Horizontal reorder list

Unable to integrate firebase

$
0
0

@rajputsachin wrote:

can anyone told me what is the step to integrate firebase in ionic and how my ionic cli know on which gmail id my project is exist for sync in ionic3.

Posts: 1

Participants: 1

Read full topic

Viewing all 49308 articles
Browse latest View live