Quantcast
Channel: Ionic Forum - Latest posts
Viewing all 230476 articles
Browse latest View live

Routing In React, what is this `:tab` thing

$
0
0

Why does the ionic cli create a blank app in react with a route containing path="/:tab(home)"

<Route path="/:tab(home)" component={Home} exact={true} />

When path="/home" works just fine?

 <Route path="/home" component={Home} exact={true} />

I cannot find nothing in the documentation using this :tab format and I have written an app with it using tabs and it seems to be working fine


Ionic 4 won't show ads but in console is successful

$
0
0

I am trying to get Admob in my app, I get console log success message but no ad showing in my app.

This is what I have:

app.module

import { AdMobFree } from '@ionic-native/admob-free/ngx';

providers: [
    AdMobFree,
]

posts.page.ts

import { AdMobFree, AdMobFreeBannerConfig } from '@ionic-native/admob-free/ngx';

constructor(
    private admobFree: AdMobFree
) { }

ionViewDidEnter() {
    this.showBannerAds();
}

showBannerAds() {
    const bannerConfig: AdMobFreeBannerConfig = {
      id: 'ca-app-pub-xxxxxx/xxxxxxxxxx',
      isTesting: false,
      autoShow: true,
      bannerAtTop: false
    };
    this.admobFree.banner.config(bannerConfig);
    console.log('start to prepare banner ads...'); //shows in console

    this.admobFree.banner.prepare()
      .then(() => {
        console.log('start to show banner ads...'); //shows in console
        this.admobFree.banner.show();
      })
      .catch(err => {
        console.log('show banner ads error: ', err);
      });
}

PS:
At the first I thought maybe i need to add my app in google play then they show, but even that my app is live on google play store yet no ads showing.

Any idea what could be wrong?

Ionic 4 Back Button not working

$
0
0

Hi,
Please try this cod. it’s works for me

this.platform.ready().then(() => {
    this.backButtonSubscription = this.platform.backButton.subscribe(() => {
        // code that is executed when the user pressed the back button
    })
});

Foreach Ionic 3

$
0
0

You need to specify the response data type of data is an array, like:
.subscribe((data: any[]) => { ...
Then use foreach:
data.foreach((item) => { ...

Your data has to be an array to prevent errors though

Ionic app like rest server

$
0
0

I found expressJs. Can I use it in ionic application? I tried to do something like that but not working:

import express from 'express';
const app = express();
      const port = 3000;

      app.get('/', (req, res) => res.send('Hello World!'));

      app.listen(port, () => console.log(`Example app listening on port ${port}!`));

Expected action:

server side send request to ionic application by ip address (for example xxx.xxx.x.x:3000/) and then ionic application response to sever ‘Hello World!’

Error load resources in ionic 4 run android or ios

$
0
0

Hi @Tgure @kedavidsa, I didn’t find a way to solve it… So what I did, was package the app, and copy it by adb or Xcode.

Error to add android platform

$
0
0

Try to remove android platform and the readd platform and give command for run android
step-1 : ionic cordova platform rm android
step-2 :ionic cordova platform add android
step-3: ionic cordova run android

make sure you have good internet.

Set App settings programmatically

$
0
0

(topic withdrawn by author, will be automatically deleted in 24 hours unless flagged)


Ionic v3 Scroll issue after update iOS 12.2

$
0
0

This helped. Just upgrading Ionic-angular didn’t. What exactly does the css do here?

Passing data back from nav.pop()

$
0
0

it is not working in ionic 4 ? how can i use these type of things in ionic 4

Ion-item theming doesn't work

$
0
0

What have you tried in the CSS to change the background of the ion-item?

Ionicitude package: Wikitude + Ionic

$
0
0

Hello @amin20

You’re talking about an app.module.ts file. I suppose this means you’re working on an Angular project (or AngularV2+).

If this is the case, I’m sorry to tell you that the Ionicitude plugin is not compatible as-is with AngularV2+. It only works with AngularJS (or AngularV1).

Sorry !

Ionic HTTP POST reply net::ERR_NAME_NOT_RESOLVED

$
0
0

Is this suitable for the android device also? I am facing some issue on my Android device. I have visited Asus Error Code 55 but didn’t get any suitable solution.

How to use rating star in ionic 4?

$
0
0

Did you put it in the global.css file?

[NFC] Access to `transceive` method through @ionic-native/nfc

$
0
0

Hello, I have the same problem as you. Have you solved it?


Keyboard Bug ( + video ) - ion-textarea in ion-footer doesn't work as expected

$
0
0

add a class to the ion-textarea and set it position static.
It will work but not a permanent solution

Duration video does not work

$
0
0

const options: CaptureVideoOptions = {
duration: 60,
}
this.mediaCapture.captureVideo(options)
.then((data: MediaFile) => {
});
try this.it will work

NullInjectorError: No provider for Instagram!

IONIC 3 Local notification not working in IOS with FCM

$
0
0

Hi everyone… I’m struggling with this issue from more then month and finally today I’m able to run both fcm and local notification plugin together on IOS.

So here is simple trick which works for me.

ionic cordova plugin rm cordova-plugin-fcm-with-dependecy-updated
ionic cordova plugin rm cordova-plugin-local-notification

ionic cordova plugin add cordova-plugin-fcm-with-dependency-updated-apns
ionic cordova plugin add cordova-plugin-local-notification@0.9.0-beta.3

I hop this helps others.

Remove white space in ion-header after dismissing *ngIf template

$
0
0

On my Ionic 3 app page I’ve got an ion-header with and ion-searchbar inside it. Directly below the searchbar, I’m using an *ngIf directive to show an ion-grid containing the search term, if the search is active. It’s all working fine, and I’m electing to place the grid inside the header because I want the grid to always remain at the top of the screen and above the rest of the scrollable content in the page as the user scrolls results.

The problem is, when the *ngIf directive hides the grid (working correctly on native iOS device), the header still keeps the white space that the grid was taking up with it’s height. It may be worth saying this needs to be tested on native.

The code looks like this:

<ion-header>
    <ion-navbar>
        ...
    </ion-navbar>
    <ion-searchbar>
        ...
    </ion-searchbar>
    <ion-grid *ngIf="searchActive">
        ... only displayed when the search is active and when displayed, takes some extra height ...
    </ion-grid>
</ion-header>

I’ve searched a few forums now, and tried a couple of methods using dynamic CSS class to set the height of the grid to 1px when search is not active, etc… but so far the only way to reset the UI and remove that white space is to tap the searchbar again (which brings up the device keyboard) and then use the native cancel search button. That seems to reset the header to how it appears before the grid is displayed.

Any suggestions for how to neatly clear that vertical space on directive change?

Thanks in advance!

Viewing all 230476 articles
Browse latest View live


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