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

Center in column

$
0
0

@basti wrote:

Hi, I’ve a responsive <ion-grid> and in each <ion-col> one <ion-card>. Every card is with fixed height and width, so they don’t adapt to the specific screensize.
To let it look nice I want to center the <ion-card> in the <ion-col>, so the cards are not responsive but they’re centered.
Unfortunately it’s no problem to center text:
<ion-col text-center>

But the <ion-card> stays left aligned.
I also tried

align-items-center
align-self-center
justify-content-center

in <ion-col> or <ion-row>

Posts: 1

Participants: 1

Read full topic


[ionic4] How to change the app logo from within app

Open modal in app-root element instead of ion-app

$
0
0

@entom wrote:

Hello,
I need to create a modal and open in app-root element. Is it possible?
By default modal component will open in ion-app.
I’m trying to hide main ion-header behind the modal in Ionic 4.

Posts: 1

Participants: 1

Read full topic

Change background color of ion-item on click

$
0
0

@niccoicco9 wrote:

hi, how i can change the background-color when i click on an ion-item?

my code:

     <ion-item (click)="openDetail(variant)">
          {{variant.ProductVariantName}}
          <ion-button slot="end" [hidden]="variant.ProductVariantValue.length==0" fill="clear" color="dark">
            <i [class]="variant.showDetail ? 'fa fa-arrow-up fa-lg':'fa fa-arrow-down fa-lg'"></i>
          </ion-button>
        </ion-item>

Posts: 1

Participants: 1

Read full topic

Set "md" animation as default for both platforms - v4

$
0
0

@anjildhamala1 wrote:

Ionic v4.12.0

The iOS page transition animations are very choppy. My toolbar that’s colored using color directive turns white for half a second before navigating to the previous page. I used to love wp-animation in v3. Unfortunately, there’s no such option anymore. Ideally, I don’t want to create my own animation. Has anybody figured out yet a way to set “md” animation as default for both platforms?

Posts: 1

Participants: 1

Read full topic

How do I set the config settings for Android in Capacitor without resetting them on build

Ionic 4 animation library

$
0
0

@dev-gilbert wrote:

Just wondering if anybody know of a tested proven library for basic animations such as fade in, etc, for ionic 4 apps. I am currently using animated.css as it’s easy to use but I’ve found a small bug on iOS and I would like to try other options.

Just in case someone is interested, Here I explain the bug:

It’s going to be hard to explain with just words but ill do my best. First, are you familiar with animate.css? if not, take a look at this fadeInDown animation https://daneden.github.io/animate.css/

Assume you apply that class to an element on your home page for example. When you first go to that page it works perfectly fine, but if from the home page you navigate to another page and then you navigate back to home again, the fade in effect will trigger right way as it’s supposed to do but the element will make a stop half way during the transition of the fade in animation, then it will continue with the animation until the element returns to its original position. This is happening only on iOS though, everything works fine on Android or the browser.

Thanks in advance.

Posts: 1

Participants: 1

Read full topic

Registration area for touch moves sometimes!

$
0
0

@heardnetwork wrote:

I’ve got a weird bug that is killing my app on iOS. Sometimes (and i can’t find a pattern) when you hide the keyboard after you have inputted text into a form or modal, it moves the registration area of your touch!

to try and explain:

You add your text in the input field. The keyboard hides again, and If the username is taken then you have to try again. Only the area you click to input the text has now moved above the input field, so clicking on it makes it seem like it doesn’t do anything, and it seems to have frozen.

i’ve included a graphic to show it better than i have explained it (hopefully). If anyone can help, it’s killing the app as people aren’t able to click on the input again and think it’s broken!

Posts: 1

Participants: 1

Read full topic


Ionic 4 devapp debugging

$
0
0

@rfloka wrote:

Is there any way to debug Ionic 4 with devapp?

Im developing an aplication that uses Beacons and BLE and i really need debugging and ionic serve -c doesnt show anything

from what i read its a feature missing do you guys now any way to debug?

Posts: 1

Participants: 1

Read full topic

Problems to emulate after xCode update

$
0
0

@jeansilva wrote:

After update my xCode from 10.1 to 10.2, I have problem to emulate the app on ios emulators.

After I run $ ionic cordova emulate ios -l, I get this:

BUILD SUCCEEDED
[cordova]  
[cordova]  No target specified for emulator. Deploying to undefined simulator
[cordova]  Device type "com.apple.CoreSimulator.SimDeviceType.undefined" could not be found.
[ERROR] An error occurred while running subprocess cordova.
$ ionic cordova emulate ios --list
Available ios virtual devices:

So I’ve did
$ cd platforms/ios/cordova/ && npm i ios-sim@latest

But, I keep getting No target specified for emulator. Deploying to undefined simulator, just like before.

I also tried instal the next version of ios-sim, but I think it’s compatible.

$ ionic info

Ionic:

   ionic (Ionic CLI)  : 4.12.0 (/Users/jeansilva/.nvm/versions/node/v8.12.0/lib/node_modules/ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.3

Cordova:

   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : ios 4.5.5
   Cordova Plugins       : no whitelisted plugins (13 plugins total)

System:

   Android SDK Tools : 26.1.1 (/Users/jeansilva/Library/Android/sdk/)
   ios-deploy        : 1.9.4
   ios-sim           : ios-sim/9.0.0-dev.1 darwin-x64 node-v8.12.0
   NodeJS            : v8.12.0 (/Users/jeansilva/.nvm/versions/node/v8.12.0/bin/node)
   npm               : 6.4.1
   OS                : macOS Mojave
   Xcode             : Xcode 10.2 Build version 10E125

Posts: 1

Participants: 1

Read full topic

How to create equal passwords validation in a simple way

$
0
0

@Fares95 wrote:

Hello my friends , I have a problem with a form that i can not know how to put validators for passwords
my page.html

<ion-header>

  <ion-navbar color="tertiary">
    <ion-buttons left>
      <button ion-button icon-only menuToggle="left">
        <ion-icon name="menu"></ion-icon>
      </button>
    </ion-buttons>
    <ion-title>Inscription</ion-title>
  </ion-navbar>

</ion-header>

<ion-content  padding >

<ion-row justify-content-center align-items-center style="height: 100%">
  <p>
    Inscrivez-Vous
  </p>
<form #f="ngForm" (ngSubmit)="presentToast()" [formGroup]="Form" (ngSubmit)="onSubmit(f)">

          <ion-item>
            <ion-label stacked>CIN  :  </ion-label>
            <ion-input  name="cin" type="number" placeholder="10558858" formControlName="cin" clearInput ngModel required></ion-input>
          </ion-item>

            <ion-item>
              <ion-label stacked>Nom et Prénom :  </ion-label>
              <ion-input  name="fullname" type="text" formControlName="fullname" placeholder="exp : Abir Tounsi " clearInput ngModel required></ion-input>
            </ion-item>

            <ion-item>
              <ion-label stacked>Email :  </ion-label>
              <ion-input  name="mailadress"  type="email" formControlName="mailadress"  placeholder="abir.tounsi@gmail.com " clearInput ngModel required></ion-input>
            </ion-item>

            <ion-item>
   <ion-label stacked>Mot de passe  :</ion-label>
   <ion-input name="password" type="password" formControlName="password" placeholder="Mot de passe" clearInput ngModel required></ion-input>
          </ion-item>

          <ion-item>
 <ion-label stacked>Retaper le Mot de passe  : </ion-label>
 <ion-input name="password-repeat" type="password" formControlName="password_repeat" equals-to="Form.password"  placeholder="Retaper le Mot de passe" clearInput ngModel="password" required></ion-input>
        </ion-item>

  <ion-item>
    <ion-label stacked>Date de Naissance : </ion-label>
    <ion-input name="date-ns" type="date" placeholder="Votre date de naissance : " formControlName="date_ns" displayFormat="MM DD YY" cancel-text ngModel="password_repeat" required></ion-input>
  </ion-item>

              <ion-col text-center>
              <button ion-button block color="success" (click)="onGoToInscrire()" [disabled]="f.invalid" >
                Inscrivez-Vous
              </button>
              </ion-col>

              <ion-col text-center>
                    <button ion-button block color="danger" type="reset" [disabled]="f.invalid">
                    Initialiser
                    </button>
                  </ion-col>
                </form>
</ion-row>
</ion-content>

my page.ts

import { Component, OnInit } from '@angular/core';
import { NavController, NavParams } from 'ionic-angular';
import { ToastController } from 'ionic-angular';
import { EspaceCitoyenPage } from '../espace-citoyen/espace-citoyen';
import { FormBuilder, FormGroup, Validators, NgForm } from '@angular/forms';

@Component({
  selector: 'page-inscription',
  templateUrl: 'inscription.html',
})

export class InscriptionPage {
private Form : FormGroup;

constructor(public navCtrl: NavController, public navParams: NavParams, public toastCtrl: ToastController, private formBuilder: FormBuilder) {

this.Form = formBuilder.group({
    cin: ['', Validators.compose([Validators.required, Validators.pattern('[0-9]*'), Validators.minLength(8), Validators.maxLength(8)])] ,
    fullname: ['', Validators.compose([Validators.required, Validators.pattern('[a-zA-Z]*'), Validators.minLength(5), Validators.maxLength(30)  ])],
    mailadress: ['', Validators.compose([Validators.required , Validators.pattern('^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+$')])],
    password: ['', Validators.compose([Validators.required, Validators.minLength(8) ])],
    password_repeat: ['', Validators.compose([Validators.required, Validators.minLength(8),  Validators.maxLength(30) ])],
    date_ns : ['', Validators.compose([Validators.required ])]
});


  }

  ionViewDidLoad() {
    console.log('ionViewDidLoad InscriptionPage');
  }

onGoToInscrire() {
this.navCtrl.push(EspaceCitoyenPage);

}

presentToast() {
    const toast = this.toastCtrl.create({
      message: 'Félicitations ; Vous êtes inscrit !',
      duration: 4000
    });
    toast.present();
  }


  onSubmit(form: NgForm) {
      console.log(form.value);
  }

}

please help me , i am trying for hours and still did not solve this

Posts: 1

Participants: 1

Read full topic

firebase.auth().currentUser is null after refresh

$
0
0

@wekas wrote:

I thought the firebase javascript SDK was meant to automatically refresh the token and keep the user logged in. When I refresh my page (web) the currentUser is reset to null and my authguard fails and I have to log in again.

Basically I want it to auto login the user / refresh token if needed. Anyone know how to do this?

Looked at these but couldn’t figure it out:


Posts: 1

Participants: 1

Read full topic

Disable Ion menu in login in Ionic4

How to Encrypt and decrypt request, response through my ionic app with node js server

$
0
0

@Dineshn wrote:

Hi,
I need to encrypt the request to node js server for ionic app.Also need the response in encrypted format for nodejs server. I required this because request and response data is display in plain json and anybody can read it by using any tool like burp or owasp.

Please help me on this.

Posts: 1

Participants: 1

Read full topic

Access page child component in app.component.ts

$
0
0

@john33john33 wrote:

Case:
handle hardware back button in app.component
in some pages, there’s
If exist custom back button, call “back” function inside that component
Else, use pop in nav controller if stack length > 1

Idea:

  1. Tried ViewChild in app.component; however, no reference found

  2. Look into (ionic-angular)Nav.last().getContent()
    Can see element in ion-content but not those in ion-header/ion-navbar

  3. Look into current view controller
    But no sign of child component of the page

Question:
In app.component, how to access current page element?

Thanks all

Posts: 1

Participants: 1

Read full topic


Ionic app dynamically data not showing correctly iOS, Android works

$
0
0

@Krycek wrote:

I have an Ionic 3 app for Android and iOS. The app uses an API to get data from the server. This works for Android, but for iOS I don’t get the view updated with the response of the server.

.ts file

ionViewWillEnter() {
    this.rest.get(this.url).subscribe(res => {
        this.profile = res['profile'];
        this.statistics = res['statistics'];
    });
}

provider

return this.http.get(`${this.API_URL}/${resource}`, {'params': param})
        .map(response => response);

Template

<ng-container *ngIf="this.rest.isLoading === false">
    <ion-row class="stats" padding-horizontal="">
        <ion-col col-6>Friends</ion-col>
        <ion-col col-6 text-right>{{statistics?.friends}}</ion-col>
    </ion-row>

    <ion-row class="stats" padding-horizontal="">
        <ion-col col-6>Achievements</ion-col>
        <ion-col col-6 text-right>{{statistics?.achievements}}</ion-col>
    </ion-row>
</ng-container>

in Android the stats are nicely updated, but on iOS it stays blank except the fixed text, that is shown.

But when we go to a subpage and then use the back button or open and close the menu, we get the data visible (see attached screenshot).

Ionic info

Ionic:

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

Cordova:

   cordova (Cordova CLI) : 9.0.0
   Cordova Platforms     : android 7.1.4
   Cordova Plugins       : cordova-plugin-ionic-webview 1.2.1, (and 11 other plugins)

System:

   Android SDK Tools : 26.1.1 (C:\Android\android-sdk)
   NodeJS            : v10.15.0 (C:\Program Files\nodejs\node.exe)
   npm               : 6.9.0
   OS                : Windows 10

Posts: 1

Participants: 1

Read full topic

Google Plus plugin not working when we download our app from Play Store

An annoying little square on Android devices in ionic3?

$
0
0

@RomnEmpire wrote:

Recently I created an hybrid application developped with Ionic 3. I noted a little problem: sometimes a little square appears when I activate a page from the side menu.initially not show any little square but after jump new page and jump to previous screen now show little square.

Steps to reproduce:

add Below css in app:

scroll-content{ overflow-y: auto; }

.scroll-content{ overflow-y: auto !important; }

.content .scroll-content { overflow-y: auto; }

Posts: 1

Participants: 1

Read full topic

Failed to find 'ANDROID_HOME' and 'android'

Push Notification expansion in ionic 3

$
0
0

@hasnainsakir001 wrote:

Hi,
am trying to get an expandable push notification. which shows image from my backend. am using the cordova fcm plugin for push notification is there any way to implement this in ionic 3, can anyone help me with this.

Thanks in advance

Posts: 1

Participants: 1

Read full topic

Viewing all 49215 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>