Quantcast
Channel: Ionic Forum - Latest topics
Viewing all 70440 articles
Browse latest View live

Cpu mismatch architecture

$
0
0

@cikcoh wrote:

HI, I already have working build that support kitkat & above in playstore.
But need to upload another to support jellybean users. So i duplicate the project, install cordova-android 6.4 and crosswalk.

Finally managed to build successfully. Added in config.xml

preference name=“xwalkMultipleApk” value=“false” />

Installed unique apk to emulator with jellybean api and app ‘stopped working’. Not sure how to debug this?
So, i tried to install to my device with nougat api and get the ‘mismatch cpu architecture’ instead.

Help would be appreciated on how to debug these issues.

Thnaks

Posts: 1

Participants: 1

Read full topic


How to set current timezone to ion-datetime

$
0
0

@knandhucse wrote:

Hello,

My question may be a duplicate one but if I get the answer to my question, it will be very helpful.

I am using ion-datetime control in ionic 4. I want the control to take the current timezone without setting the default value to it.

When I open the picker, by default, it showing the UTC value instead of the current timezone value.

For example, The actual time is 01-Mar-2019 11:17 PM but when I open the picker, it is showing 01-Mar-2019 05:47 PM. How can I fix this without setting the default value to the control?

image

Posts: 1

Participants: 1

Read full topic

How to display image in same model from different folder in ionic 4?

$
0
0

@gokujy wrote:

Hello
I have images in 10 folders and I am displaying image in 10 pages. I have one model for display single image. So my question is is there any way to display all image in the same model.
here I have the code:

**home.ts**
<ion-card class="one-image" *ngFor="let image of imgArr">
          <img src="http://example.com/ionic/imgfolder1/{{image}}.jpg" tappable (click)="openPreview(image)">
        </ion-card>
**home.ts**
 import { ModalController } from '@ionic/angular';
        import { ImageModalPage } from '../image-modal/image-modal.page';
    
       openPreview(image) {
        this.modalController.create({
          component: ImageModalPage,
          componentProps: {
            image: image
          }
        }).then(modal => {
          modal.present();
        });
      }

image-model.page.ts

import { Component, OnInit, ViewChild, ElementRef } from '@angular/core';
    import { NavParams, ModalController } from '@ionic/angular';

    @ViewChild('slider', { read: ElementRef })slider: ElementRef;
    image: any;

    constructor(private navParams: NavParams, private modalController: ModalController) { }

    ngOnInit() {
  	  this.image = this.navParams.get('image');
    }

    zoom(zoomIn: boolean) {
     let zoom = this.slider.nativeElement.swiper.zoom;
     if (zoomIn) {
       zoom.in();
     } else {
       zoom.out();
     }
    }
 
    close() {
     this.modalController.dismiss();
    }

model.html

<ion-slides #slider>
      <ion-slide>
        <div class="swiper-zoom-container">
          <img src="http://example.com/ionic/imgfolder1/{{ image }}.jpg">
        </div>
      </ion-slide>
    </ion-slides>

Here is my full code, I want to display images from diff page in the same model.

Posts: 1

Participants: 1

Read full topic

Bottom of page is always hidden

$
0
0

@attorneymatcherapp wrote:

Hi,

I have a problem in my Ionic v3.9.2 app. I have pages with ion-tabs. On each of such pages, bottom of it is not visible. I am not able to make it visible with any of CSS tricks known to human kind. I attach two images which show this problem.

On the first one, violet button is not visible.

error

Posts: 1

Participants: 1

Read full topic

APK and Weird login screen

$
0
0

@vanirajendran wrote:

I created an apk and downloaded to android phone to test the app. We work remote so I had to let my users download the app in their android phones.

I created a login screen for a prototype we built. It works great on browser. and works majority of the time in the phone. But when app is open and phone goes to sleep mode and when we re-open the phone, it goes to weird login screen as below

This screen is no way related to our login screen.

Any one had this issue and please advise how to fix this…

Posts: 1

Participants: 1

Read full topic

Is it possible to inject AngularJS (1.7.2) directive to a modal in Ionic 4?

$
0
0

@raz-ride4you wrote:

This is the official documentation of creating a modal in Ionic 4 - for vanilla JS:

customElements.define('modal-page', class extends HTMLElement {
  connectedCallback() {
    this.innerHTML = `
<ion-header>
  <ion-toolbar>
    <ion-title>Super Modal</ion-title>
  </ion-toolbar>
</ion-header>
<ion-content>
  Content
</ion-content>`;
  }
});

async function presentModal() {
  // initialize controller
  const modalController = document.querySelector('ion-modal-controller');
  await modalController.componentOnReady();

  // present the modal
  const modalElement = await modalController.create({
    component: 'modal-page'
  });
  await modalElement.present();
}

presentModal();

This will pop the modal with the HTML that was “manually” written in the innerHTML.
However I want to render AngularJS directive, for example:

customElements.define('modal-page', class extends HTMLElement {
  connectedCallback() {
    this.innerHTML = `<my-custom-directive-functionality></my-custom-directive-functionality>`;
  }
});

However this doesn’t work and the modal appears blank.

Is it possible to do something like this:

// page.html
<modal-content></modal-content>

// page.js
const modalContent = document.querySelector('modal-content');

// and then create the modal with the next data:
const modalElement = await modalController.create({
    component: modalContent
  });

Posts: 1

Participants: 1

Read full topic

Ionic 4 sub paths not loading when running ionic serve

$
0
0

@disrupt wrote:

I had an ionic 4 beta project of --type=angular that was loading at any path without issue.

Periodically, i have been updating my packages by running an npm update and am currently at:

"@ionic/angular": "^4.0.2"

as well as updated installs for the ionic cli, and am currently at:

CLI 4.10.3

I am not sure when this app loading issue started, but i suspect it was after running the last npm update or update install of the cli.

When running ionic serve my application loads correctly, and i am able to navigate to all sub paths without any issues.

However, when refreshing the browser when viewing a sub path, or attempting to enter a url with a sub path, the app attempts to load all js files relative to the sub path and fails to run like so:

http://localhost:8100/page/sub/path

fails to load because the app attempts to load runtime.js here:

http://localhost:8100/page/sub/path/runtime.js

my base href is currently set to ./

When i inspect the html source, the script tags are formatted as follows:

<script type="text/javascript" src="runtime.js"></script>

If i attempt to load a page directly at the root, the application loads ok without issue like so:

http://localhost:8100 loads OK

http://localhost:8100/page loads OK

So again to recap, the app only fails to load the js assets at a sub path.

Any idea where to begin troubleshooting?

Posts: 1

Participants: 1

Read full topic

Push notification with Node.js

$
0
0

@quotennial wrote:

Hi ,

Are there any tutorials on how to use the ionic push notifications. All the tutorials are using firebase and \i’m currently using a Node server.

I want to be able to send the same push notification every 10 days as a reminder in my ionic 3 mobile app (iOS and Android)

Thanks!

Posts: 1

Participants: 1

Read full topic


Ionic 3 + PHP

$
0
0

@Pabloco90 wrote:

Greetings !

I have the next issue: I’m trying get some information from a table in SQL Server and display them in a ion-select. I have the next code:

file.ts

for(var i = 0;i < data.length; i++){
    this.list = [
       {"Room": data[i][2],"ID":data[i][1]}
     ]
}

file.html

<ion-select [(ngModel)]="select">
   <ion-option value="">Select a option</ion-option>
   <ion-option *ngFor="let list of lists" value="{{ID}}">{{Room}}</ion-option>
</ion-select>

But the ion-select don’t display them.

Posts: 1

Participants: 1

Read full topic

Ionic 4 splash screen blurred on Samsung Tablet

$
0
0

@sqr08 wrote:

On my Samsung Galaxy Tab the splash screen is blurry. What I did was changed the drawable-port-mdpi-screen.png and drawable-land-mdpi-screen.png to be 1920x1280 and 1290x1920 respectively which fixed this in ionic 3 but instead the splash screen doesn’t show up anymore. any ideas?

Posts: 1

Participants: 1

Read full topic

Ionic v4 keyboard pushing content up

$
0
0

@dev-gilbert wrote:

I am struggling find a solution for this issue, this method Keyboard.disableScroll(true) no longer exist with the later version of the keyboard plugin.

How can I fix this problem?

Posts: 1

Participants: 1

Read full topic

Error building iOS in Ionic AppFlow / Ionic Pro

$
0
0

@ricardoalexanderh wrote:

Hi,

I’m using ionic pro for building the iOS IPA file (development), but is getting an error like this:

error: No certificate matching ‘iPhone Developer: Some Name (XXXXXXXX)’ found: Select a different signing certificate for CODE_SIGN_IDENTITY, a team that matches your selected certificate, or switch to automatic provisioning. (in target ‘AppName’)
[00:14:35]: ▸ ** ARCHIVE FAILED **

:x: error: No certificate matching ‘iPhone Developer: Some Name (XXXXXXXX)’ found: Select a different signing certificate for CODE_SIGN_IDENTITY, a team that matches your selected certificate, or switch to automatic provisioning. (in target ‘AppName’)


It seems that i have to specify the correct CODE_SIGN_IDENTITY and Development Team ID (it should be the XXXXXXX), but how to do this in Ionic AppFlow / Ionic Pro.

I know that we can use build.json and overwrite the build config using --buildConfig=build.json, but we cannot alter the cordova build command in Ionic AppFlow / Ionic Pro.

I’m struggling with this issue for a week.

Thanks!

Posts: 1

Participants: 1

Read full topic

Ion button change text color

$
0
0

@alfaodin wrote:

This is a problem I have in Ionic 4, but there is not the category (sorry), The problem is realy easy I want to change the color of an ion button, documentation says
(–color). It does not work , Do I need something else. Thank you.

Posts: 1

Participants: 1

Read full topic

Expand="block" not working on button in ionic 4

$
0
0

@anuj9196 wrote:

I’m using Ionic 4.

I have set button like

<ion-item lines="none">
    <ion-button type="submit" color="primary" expand="block">
        Login
    </ion-button>
</ion-item>

<ion-item lines="none">
    <ion-button type="button" color="danger" expand="block" (click)="loginGoogle()">
        Login using Google
    </ion-button>
</ion-item>

But buttons are not full width

59%20AM

Posts: 1

Participants: 1

Read full topic

Create JavaScript Project Ionic4


Making card on top of the item

$
0
0

@anuj9196 wrote:

I am designing a layout like

59%20AM

I have the HTML defined as

<ion-content>

    <ion-item color="primary">

        <ion-grid fixed padding padding-top padding-bottom class="auth-header">
            <ion-row>
                <ion-col text-center>
                    <ion-item lines="none" color="transparent">
                        <ion-img src="./assets/images/logo/no11_100.png" class="auth-logo"></ion-img>
                    </ion-item>
                </ion-col>
            </ion-row>

            <ion-row>
                <ion-col text-center>
                    <ion-item lines="none" color="transparent">
                        <ion-label text-center class="label-solid">Login</ion-label>
                    </ion-item>
                </ion-col>
            </ion-row>
        </ion-grid>

    </ion-item>

    <ion-item lines="none">

        <ion-grid>
            <ion-row>
                <ion-col>

                    <ion-card class="auth-card">
                        <ion-card-content>

                            <-- form content here -->

                        </ion-card-content>
                    </ion-card>

                </ion-col>
            </ion-row>
        </ion-grid>

    </ion-item>
</ion-content>

Which looks like

Here the top of the card is hidden behind the blue background.

I have added following CSS

:root {
  .auth-card {
    margin-top: -50px;
  }
}

How could I bring it to top?

Posts: 1

Participants: 1

Read full topic

'ion-anchor' is not a known element:

$
0
0

@anuj9196 wrote:

I’m using Ionic 4.

I have defined an anchor tag like

<ion-anchor href="/forgot" routerDirection="forward">
    Forgot Password?
</ion-anchor>

But this is giving an error

'ion-anchor' is not a known element:

The documentation describes it

Posts: 1

Participants: 1

Read full topic

Error: Uncaught (in promise): TypeError: Object(...) is not a function when implementing network

$
0
0

@Vbhumire wrote:

Hi i am new to Ionic.when i am implementing network functionality to know the status of network i am facing the following error.

Error: Uncaught (in promise): TypeError: Object(…) is not a function
TypeError: Object(…) is not a function
at Network.onDisconnect (vendor.js:75352)
at new HomePage (main.js:563)
at createClass (vendor.js:13176)
at createDirectiveInstance (vendor.js:13011)
at createViewNodes (vendor.js:14469)
at createRootView (vendor.js:14358)
at callWithDebugContext (vendor.js:15783)
at Object.debugCreateRootView [as createRootView] (vendor.js:15066)
at ComponentFactory_.create (vendor.js:11963)
at ComponentFactoryBoundToModule.create (vendor.js:4715)
at c (polyfills.js:3)
at c (polyfills.js:3)
at polyfills.js:3
at t.invokeTask (polyfills.js:3)
at Object.onInvokeTask (vendor.js:5436)
at t.invokeTask (polyfills.js:3)
at r.runTask (polyfills.js:3)
at o (polyfills.js:3)
at e.invokeTask [as invoke] (polyfills.js:3)
at p (polyfills.js:2)

can anyone please help me out.

Thanks in advance

Posts: 1

Participants: 1

Read full topic

Returning data from Ionic4 Modal [object Object]

$
0
0

@aligassan wrote:

I’m trying to create a modal window inside Home Page , pass it an radio group , when a user select one value from that radio group, and then have my modal pass back the object they’ve selected to Home Page again .

radio group page and html

  export class PopoverstationsPage implements OnInit {

      cities :any

      constructor(public nav : NavController,public nav : NavController,public modalController: ModalController ,public router : Route) { }

      ngOnInit() {
        console.log(this.cities)
      }

      onRadioChange(cities: Tab1Page):void {
    this.modalController.dismiss(cities);

      console.log(this.cities)
  }

    }

html

<ion-list>
        <ion-radio-group (ionChange)="onRadioChange()" [(ngModel)]="cities">
            <ion-list-header>
                <ion-label>Name</ion-label>
            </ion-list-header>

            <ion-item>
                <ion-label>ميناء خصب</ion-label>
                <ion-radio slot="start" value="26.2105,56.244" ></ion-radio>
            </ion-item>

            <ion-item>
                <ion-label>مطار خصب</ion-label>
                <ion-radio slot="start" value="26.161722,56.23672"></ion-radio>
            </ion-item>
            <ion-item>
                <ion-label>دبا</ion-label>
                <ion-radio slot="start" value="25.615627,56.247322"></ion-radio>
            </ion-item>
            <ion-item>
                <ion-label>البريمي</ion-label>
                <ion-radio slot="start" value="24.233913,55.916176"></ion-radio>
            </ion-item>

        </ion-radio-group>
  </ion-list>

home page receive value form page above then use it in test function weather

     export class HomePage implements OnInit {

              cities :any

              constructor(public nav : NavController,public modalController: ModalController) { }

              ngOnInit() {
                console.log(this.cities)
              }

            async openUserModal() {
           const modal = await this.modalController.create({
         component: PopoverstationsPage,
        componentProps: { cities: this.cities },
      });

      modal.onDidDismiss()
        .then((data) => {
          const cities= data
          console.log(cities)
      });

      return await modal.present();
    }


async test (){

  this.https.get('weather/'+this.cities+'.json')
  .subscribe(data => {

    this.weather = data

  })


}

 }

when data ara return l got [object Object] in console ! anyidea please ?

Posts: 1

Participants: 1

Read full topic

OneSignal with React

Viewing all 70440 articles
Browse latest View live


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