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

Create a full page white background for loading controller

$
0
0

@thehuangkai wrote:

Hi everyone,

I am using the loading controller to create a loading screen.

However I want it to be full page and opaque so that the user do not see what is happening on the screen when it is loading. the current version has a grey translucent screen

Any idea how that can be done?

Posts: 1

Participants: 1

Read full topic


App rate plugin issue

$
0
0

@flycoders_sourav1 wrote:

While i use app rate plugin and try to implement in app.component page. and build properly but when i installed in real device’s app showing blank white screen

Posts: 1

Participants: 1

Read full topic

Plugins native error: Object(…) is not a function

$
0
0

@JorchDeveloper wrote:

Hi, I have had problems with an error that I have given certain plugin. In concrete those ones:

import { FilePath } from ‘@ionic-native/file-path/ngx’;
import { FileChooser } from ‘@ionic-native/file-chooser/ngx’;
import { IOSFilePicker } from ‘@ionic-native/file-picker/ngx’;
import { FileOpener } from ‘@ionic-native/file-opener/ngx’;
import { Geolocation } from ‘@ionic-native/geolocation/ngx’;
import { LaunchNavigator } from ‘@ionic-native/launch-navigator/ngx’;
import { Base64 } from ‘@ionic-native/base64/ngx’;

I added the ngx since they were giving me compilation errors (here is the post that solved the problem for me (https://stackoverflow.com/questions/54361396/ionic-3-error-install-native-plugin-after-ionic-4-release)) in my module.app. Once I added the termination of the imports, the application compile but when using any of the funtion of plugins I get the error ERROR TypeError: Object (…) is not a function
I have plugin and ionic versions updated.

Muchas gracias.

Posts: 2

Participants: 2

Read full topic

Add tabs and side menu globally

$
0
0

@akhilkathi97 wrote:

I am using the latest ionic 4.10.0. I want to create a template with tabs and side menu on every page.I made required changes elsewhere for menu to display.I formatted the app.component.html to look like this.


<ion-app>

<ion-split-pane>

<ion-menu>

<ion-header>

<ion-toolbar>

<ion-title>Menu</ion-title>

</ion-toolbar>

</ion-header>

<ion-content>

<ion-list>

<ion-menu-toggle auto-hide="false" *ngFor="let p of appPages">

<ion-item [routerDirection]="'root'" [routerLink]="[p.url]">

<ion-icon slot="start" [name]="p.icon"></ion-icon>

<ion-label>

{{p.title}}

</ion-label>

</ion-item>

</ion-menu-toggle>

</ion-list>

</ion-content>

</ion-menu>

<ion-router-outlet main></ion-router-outlet>

</ion-split-pane>

<ion-tabs>

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

<ion-tab-button tab="tab1">

<ion-icon name="home"></ion-icon>

<ion-label>Home</ion-label>

</ion-tab-button>

<ion-tab-button tab="tab2">

<ion-icon name="mic"></ion-icon>

<ion-label>AskBot</ion-label>

</ion-tab-button>

</ion-tab-bar>

</ion-tabs>

</ion-app>

Either the menu works or tab works.Combination of both doesn’t work

Posts: 1

Participants: 1

Read full topic

Ionic 4 - must be a rtl/ltr bug? (MULTI LANGUAGE APP)

$
0
0

@CreativeArtDesign wrote:

### THIS MUST BE A BUG!!

Global.SCSS BASED ON RTL OR LTR DOES NOT WORK!!
In my case it is very simple if i use RTL i would like to have use RTL style located in global.scss.
Like Ionic 3. But this does not work for me. I migrated to ionic 4 and getting stuck with this problem.

[dir="ltr"] {
  ion-button {
    //My style for LTR
  }
}
[dir="rtl"] {
  ion-button {
   //My style for RTL
  }
}

I trying to change the direction based on what i have choice in my language service variable set. (RTL or LTR) in my ion-header or ion-content .
Have tried code above in global.scss. But only work if you have the direction in index.html.

The global style does not care only look at index.html direction it does not care about my home.page.html if i have put dynamic direction

It always look at index.html . and take the direction from there and use that style that is set there.
([dir=“rtl”] ); --> look only in index.html can not figure out how to fix this.

Is there no fix for this yet? I would like to have the direction based on what language i choice,
In my case i have 2 diffrent styles one for LTR and one for RTL .

Is there any solution for this?

I have post this on github also as a comment… hope everybody can see it.

Posts: 1

Participants: 1

Read full topic

Load modal component dynamically

$
0
0

@Qbikaris wrote:

I am trying to load a component dynamically into a modal box but I can’t seem to figure out how to do this correctly.

I managed to load the component dynamically by its name. I can then add it to the page:

    const factories = Array.from(this.componentFactoryResolver['_factories'].keys());
    const factoryClass = <Type<any>>factories.find((x: any) => x.name.toLowerCase() === "componentname");
    const componentFactory = this.componentFactoryResolver.resolveComponentFactory(factoryClass);
    let compRef = this.detailcontainer.createComponent(componentFactory);

But how can I add it to the component property when creating a modal dialog? compRef is of typeComponentRef<any> but component expects the type ComponentRef.

    return this.modalController.create({
      component: ???
    }).then((x) => x.present());

Thanks for helping!

Posts: 1

Participants: 1

Read full topic

Not able to add id in ionic alert popup element

$
0
0

@shreyama wrote:

I have tried to add 'id ’ inside the ion-alert-controller, but not able to do. is there any way to add ID in the ionic alert controller? and also i want to add icon inside the alert popup, but did not find out any way. i’m new user of ionic frame-work. please help me

Posts: 1

Participants: 1

Read full topic

Ionic 4 not showing data in HTML

$
0
0

@pthirumalagiri wrote:

l’m developing app.The code working fine in console with out any error , but no information in html. Here is the code : home.page.html

<ion-header>
  <ion-toolbar>
    <ion-buttons slot="start">
      <ion-menu-button></ion-menu-button>
    </ion-buttons>
    <ion-title>
      Home
    </ion-title>
  </ion-toolbar>
</ion-header>

<ion-content>
    <ion-grid>
      <ion-row>
        <ion-slides>
          <ion-slide *ngFor="let product of products">
           <ion-card no-padding>
              <img [src]= 'product.images[0].src' />
              <p>{{product.name}}</p>
              <p>{{product.title}}</p>
           </ion-card>
          </ion-slide>
        </ion-slides>
      </ion-row>
    </ion-grid>
</ion-content>

home.page.ts

import { Component } from '@angular/core';
import { NavController } from '@ionic/angular';
import * as WS from 'woocommerce-api';


@Component({
  selector: 'app-home',
  templateUrl: 'home.page.html',
  styleUrls: ['home.page.scss'],
})
export class HomePage {
  WooCommerce : any;
  products : any[];
  constructor(public navCtrl : NavController)
  {
    this.WooCommerce = WS({
      url:"http://*****.com",
      consumerKey: "ck_******",
      consumerSecret: "cs_*****",
      wpAPI: true,
      version: 'wc/v1'
    });
    this .WooCommerce.getAsync("products").then((data) =>{
      console.log(JSON.parse(data.body));
      this.products= JSON.parse(data.body).products;
    },(err) =>{
      console.log(err)
    })

}

Ionic Info:

ionic (Ionic CLI) : 4.10.0

System:

NodeJS : v11.8.0 npm : 6.5.0 OS : Windows 10

Posts: 1

Participants: 1

Read full topic


Ionic resources returns 410 (gone) error?

$
0
0

@tutu10 wrote:

I just installed a brand new project, and I want to do

ionic cordova resources
Then, after typing my credentials, is this answer :

Request: POST https://api.ionic.io/login
Response: 410
Body:
{}

Has someone got this problem ?

Posts: 1

Participants: 1

Read full topic

Cordova platform browser and PWA

$
0
0

@badpenguin wrote:

Is it not clear to me how to use camera and media capture for PWA.
Should i use cordova platform “browser” ?
Or ionic native provide something different?
Or i’ve just to implement it in HTML5 myself?

Posts: 1

Participants: 1

Read full topic

Notifications are never shown

$
0
0

@johanf82 wrote:

Hi!

I am not really experienced with Ionic, yet. So please bare with me.

I am trying to show a notification at a certain date and time. I have tried a lot, but it is never showing in the emulator. I found and edited this piece of code:

createnotification() {
let remindid = new Date().getUTCMilliseconds();
this.date = moment(“2019-01-31 12:20:00”).format(“YYYY-MM-DD HH:mm:ss”);

let notification = {
  id: remindid,
  title: this.title,
  text: this.description, 
  forceShow: 'true',
  coldstart: true,
  foreground: false,
  at: this.date
};

cordova.plugins.notification.local.schedule(notification);

let alert = this.alrtCtrl.create({
  title: 'Notifications set at ' + this.date,
  buttons: ['Ok']
});

alert.present();

}

I think it has something to do with the “at” property. I tried different variations of the date, used the “trigger”-property. Nothing seems to work.

What am I missing?

Posts: 1

Participants: 1

Read full topic

Ionic selected value after fill select not reflected in UI

$
0
0

@gaiapuffo wrote:

Hi,

I have a form with a select component that I fill with for cicle.
After I fill the select in ts file, I make

this.skillForm.controls[“skill_level_id”].setValue(skill_level_id);

But I see nothing in the UI but if I open the select I see that the value is selected in right way.
This is a piece of my code on pastebin

https://pastebin.com/X0UaAXwk

Posts: 1

Participants: 1

Read full topic

How do I promote sports betting game website in USA?

$
0
0

@yatendrathegamer wrote:

if you are looking to promote sport betting App in USA, consider running a facebook ads to reach your target audience. facebook have a billion visit every single day so to my own experience, all your audience are already on facebook. you only need how to run facebook ads perfectly to reach those audience

you can start running ads with nothing less than $5 dollar per day ads

Posts: 1

Participants: 1

Read full topic

Ion-select-option is not binding imgs

Deeplinks not assignable to provider


Fragment Shader Error

$
0
0

@RenanFialho wrote:

Hello Guys!! I’m using tensorflow js in my project and when a execute the function estimateSinglePose the result is an error. Does someone use TensorFlor JS MobileNet?
my code:

import * as posenet from '@tensorflow-models/posenet';

const imageScaleFactor = 0.5;
const outputStride = 16;
const flipHorizontal = true;

convertToDataURLviaCanvas(url, outputFormat){
    return new Promise((resolve, reject) => {
    let img = new Image();
    img.crossOrigin = 'Anonymous';
    img.onload = () => {
        let canvas = <HTMLCanvasElement> document.createElement('CANVAS'),
          ctx = canvas.getContext('2d'),
          dataURL;
        canvas.height = img.height;
        console.log(canvas.height);
        canvas.width = img.width;
        console.log(canvas.width);
        ctx.drawImage(img, 0, 0);
        dataURL = canvas.toDataURL(outputFormat);


        resolve(dataURL);
        canvas = null;
      };
      img.src = url;
      this.estimatePoseOnImage(img);
    });
  }

  async estimatePoseOnImage(imageElement){
    let poses = [];
    const net = await posenet.load();

    const pose = await net.estimateSinglePose(imageElement, imageScaleFactor, flipHorizontal, outputStride);
    poses.push(pose);
    console.log(poses);
}

Ionic:

ionic (Ionic CLI) : 4.9.0 (C:\Users\renan\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.1

Cordova:

cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : android 7.1.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.3.1, (and 5 other plugins)

System:

Android SDK Tools : 26.1.1 (C:\Users\renan\AppData\Local\Android\Sdk)
NodeJS : v10.15.0 (C:\Program Files\nodejs\node.exe)
npm : 6.4.1
OS : Windows 10

Posts: 1

Participants: 1

Read full topic

Ionic json data and infinite scroll

$
0
0

@RenzoM78 wrote:

Hello all,

I have a question. When Im pulling data from an external json file nothing is wrong but when I use the infinite scroll for the same data then suddenly all data is invisible. What tutorial of infionite scroll I use nothing works.

Is there something wrong with infinite scroll and json data? Or is there a sort same manner to to this also?

Posts: 1

Participants: 1

Read full topic

Ionic Studio?

$
0
0

@Llarian wrote:

Hi,

today I stumbled upon Ionic Studio, followed the lnik, was fascinating when I read

Ionic Studio is a powerful, locally-installed, visual development environment that makes it easy to build stunning apps in minutes.

read the pricing, the Starter plan is great for me, followed the link expecting to find a download…
is there a download? “Locally-installed” sounds like should be one?

Posts: 1

Participants: 1

Read full topic

Ionic 4.0.0 can't change the DIR dynamically as before with platfrom.sitDir('rtl') in ionic 3

$
0
0

@HeshamShawky wrote:

With Ionic v4.0.0 I can’t change the direction from LTR to RTL by using platform.sitDir('rtl') as before in ionic 3!!

I have searched a lot and didn’t find a replacement for platform.sitDir('rtl') from ionic 4 docs!! or even instructions for RTL support!

I actually have done something with the following code document.documentElement.setAttribute('dir', 'rtl') as an experiment it works but with a lot of issues too like the sidemenu position still on the left side not on the right! as it should.

I’m building a multi-language app ( English, Arabic ) so this a real pain for me!

Posts: 1

Participants: 1

Read full topic

Need back button in inside side menu

Viewing all 70434 articles
Browse latest View live


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