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

How to deal with ionic PWA cache?

$
0
0

@uvrcode wrote:

Hi everyone

I built a PWA with ionic 3 and angular 5.
Everytime when I make a new version I ran this command to build the www folder.

rm -rf www && ionic-app-scripts build --prod --minifyjs --minifycss --optimizejs

My problem is that it changes all the files even if I only change one line of code, so when my users try to open a page it can’t load and it raise an error, I don’t know if is the cache or something wrong with my service worker.

Someone can help me?

Posts: 1

Participants: 1

Read full topic


Implementing go add free in ionic

$
0
0

@moblizeit wrote:

A lot of apps in public domain like games etc are free and come with ads.

I have seen a lot of those have a option go premium by paying say a $1.99 and they remove all ads.

How is this implemented in ionic. I understand how i can implement the logic part of showing or not showing based on paid or not. However, how does the part of taking to apple or google playstore paying for it and then checking with app store/play store if user paid or not works?

Posts: 1

Participants: 1

Read full topic

Show Popover without click

$
0
0

@mgurzenski wrote:

How do you show a popover pointing at a button on page load (without having the user click anything)? Like this:

Here’s my current HTML and TS

home.html

<ion-content padding>
  <button ion-button (click)="showPopover($event)">Show Popover</button>
</ion-content>

home.ts

import { Component, ViewChild } from '@angular/core';
import { NavController, PopoverController } from 'ionic-angular';
import { RangeExtendPopoverPage } from "../range-extend-popover/range-extend-popover";

@Component({
  selector: 'page-home',
  templateUrl: 'home.html'
})
export class HomePage {
  constructor(public navCtrl: NavController, private popoverCtrl: PopoverController) {}
  showPopover(ev) {
    let popover = this.popoverCtrl.create(RangeExtendPopoverPage);
    popover.present({
      ev: ev
    });
  }
}

Posts: 1

Participants: 1

Read full topic

How to fix bug with ion-back-button?

$
0
0

@Caturix99 wrote:

I have implemented an ion-back-button into my toolbar in order to navigate back. But the button is not at its proper place and somehow displaced.
I even directly copied the code from the documentation but it still doesn’t work.

<ion-header>
    <ion-toolbar>
      <ion-buttons slot="start">
        <ion-back-button></ion-back-button>
      </ion-buttons>
    </ion-toolbar>
  </ion-header>

Posts: 1

Participants: 1

Read full topic

Ionic 4 option selection?

$
0
0

@aslan123 wrote:

Hi,

A few days ago, when I used to create Ionic projects, it would ask me whether I wanted to use Ionic 4 or not. I used to select no because I wanted to use Ionic 3.
However when I created an Ionic project today, it didn’t ask me whether I wanted to use Ionic 4 or not, hence I couldn’t select Ionic 3.

  1. Is this how it should be?
  2. How can I select Ionic 3?

Thank you.

Posts: 3

Participants: 2

Read full topic

Ionic 4- Lab not working

$
0
0

@aslan123 wrote:

Hi,

I created a new Ionic 4 project.

When I ran ionic lab, it came with:

Lab: http://localhost:8200
Local: http://localhost:8100
i.e. 8200 vs 8100.

In the Browser, however Ionic lab does not work (neither on 8200 nor 8100) and it gives the following error:

ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'ionic-lab'
Error: Cannot match any routes. URL Segment: 'ionic-lab'
   at Anonymous function (http://localhost:8100/vendor.js:70560:17)
   at CatchSubscriber.prototype.error (http://localhost:8100/vendor.js:86427:17)
   at Subscriber.prototype._error (http://localhost:8100/vendor.js:83166:9)
   at Subscriber.prototype.error (http://localhost:8100/vendor.js:83146:13)
   at Subscriber.prototype._error (http://localhost:8100/vendor.js:83166:9)
   at Subscriber.prototype.error (http://localhost:8100/vendor.js:83146:13)
   at Subscriber.prototype._error (http://localhost:8100/vendor.js:83166:9)
   at Subscriber.prototype.error (http://localhost:8100/vendor.js:83146:13)
   at TapSubscriber.prototype._error (http://localhost:8100/vendor.js:91160:9)
   at Subscriber.prototype.error (http://localhost:8100/vendor.js:83146:13)

I therefore got around this problem through:
mkdir www

Posts: 1

Participants: 1

Read full topic

Ionic 4 with Preact

$
0
0

@abird wrote:

I’m anxious to get going with Ionic 4 with Preact. So far I have been unable to get it to work. Has anyone been able to successfully import Ionic 4 into a Preact project?

Posts: 1

Participants: 1

Read full topic

Ionic 4 datetime max and min not working properly and bad UX

$
0
0

@mohammed_ali wrote:

Hello, I have problems with ion-datetime min and max values, In ionic 3 when you specify min and max dates when you press the input it only shows you days in between (let’s say between 2019-01/01 and 2019-01-15) any other dates will be removed and only these are visible and choosable, But in ionic 4 it select the min as default value and shows other dates other than specified dates but not clickable and in some cases after trying to click and change around I choose dates outside of provided range.
How to completely remove the dates outside the range of min and max from the input like in ionic 3 or at least disable them because currently, it has very bad UX. Here is my code:-

<ion-datetime display-format="YYYY-MM-DD" min="{{ items.today }}" max="{{ items.maxdate }}" [(ngModel)]="enddate" name="enddate">

Posts: 1

Participants: 1

Read full topic


Ionic 4 Component Docs

$
0
0

@JuanAlmeida wrote:

I’m pretty excited about the official release of v4 and the new docs page. Yeah, I know this is an early version of the new docs and is not finished yet, but I think somethings should be (re)implemented, like the searchbar.
I’m using Ionic v4 in a new personal project and there’s some features that we have to find at different places instead of the docs.
For example:

  • The component <ion-header> has the property no-border which removes (obviously) the border and the shadow of header, and the docs only shows mode="ios"|"md" and translucent="true"|"false".

  • The component <ion-slide> in the “Slides” section of the docs redirects you to an API Docs with an Not-Found.

It would be nice if the docs had every pre-made property that its components has.

Posts: 1

Participants: 1

Read full topic

MBTiles files

$
0
0

@rothdevcon wrote:

Hello,
I am trying to create an ionic application working with offline map using leaflet or mapbox and mbtiles map from openmaptiles.org since 3 weeks now, can’t find any solutions.
Can anybody help with the code to impliment that please.

Thanks

Posts: 1

Participants: 1

Read full topic

Best way to store data in online apps

$
0
0

@ghonche-yqr wrote:

hi,
i’m developing an online shop application using ionic v3 framework. i’m wondering if its better to store data on the phone or not? one solution is to keep data in a local database on the mobile phone , fill the tables when opening the app and drop them on exit. another way is to cache the loaded data and show them if the user came back to same page again. or maybe i shouldn’t store any data at all?
does anyone know how online shops like amazon app do this?

Posts: 1

Participants: 1

Read full topic

Ionic 4 Migration Problems - alertController

$
0
0

@cfwebsitesde wrote:

Hey guys…

I tyring to migrate my ionic v3 project into ionic v4… I think my error i got is kind of dumb, but when I migrate my provider to a new service i got a error caused by my AlertController.

ERROR Error: Uncaught (in promise): Error: StaticInjectorError(AppModule)[HomePage -> AlertController]:
StaticInjectorError(Platform: core)[HomePage -> AlertController]:
NullInjectorError: No provider for AlertController!
Error: StaticInjectorError(AppModule)[HomePage -> AlertController]:
StaticInjectorError(Platform: core)[HomePage -> AlertController]:
NullInjectorError: No provider for AlertController!

I think I have to do something in the app.module.ts or not? But what to do there…

import {AlertController} from “@ionic/angular”; -> in the service provider.

Posts: 2

Participants: 1

Read full topic

Ionic Calendar - Feature Request Vote

$
0
0

@tonyawad88 wrote:

Hello,

We just started a feature request for an Ionic Calendar, if you guys would like to see one developed by the Ionic team, please check out this item on GitHub and thumbs up if you agree.

Cheers!

Posts: 1

Participants: 1

Read full topic

Not working Components from https://ionicframework.com/docs/components

$
0
0

@indrafirmans wrote:

HI all,

i want report something, i am newbiee here
i try to learn ionic components from

but its doesn`t working
exsample :

<ion-label position="floating">Floating</ion-label>

but when i try

<ion-label floating>Floating</ion-label>

it`s work why it can be happend, other exsample
this is not working

<ion-button>Default</ion-button>

but when i change to
save

and here my ionic info

Ionic:

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

System:

NodeJS : v8.12.0 (C:\Program Files\nodejs\node.exe)
npm : 6.4.1
OS : Windows 10

so something wrong with docs or there is bug from ionic ?

sorry if my english bad, hekp me please

Posts: 2

Participants: 1

Read full topic

IONIC v3 WooCommerce CORS problem in android phone

$
0
0

@sauravcd02 wrote:

I am building an app for an a woocommerce website using IONIC 3. But I am facing CORS problem in my android device. I have installed disable CORS extension for chrome. But it doesn’t work for my android device.
postAsync method request blocked by CORS policy.

“Header set Access-Control-Allow-Origin “*”
Header set Access-Control-Allow-Credentials true”

after adding this line in my .htaccess file, getAsync works fine. but postAsync not.
Need some real solution.
Some of my code screenshots are attached below.
Thanks.
1

Posts: 1

Participants: 1

Read full topic


Problem with push notification on android

$
0
0

@chayaz wrote:

Hi all,
i’m realy new in ionic,
i try to develop push notification to android,
my code-
app

const options: PushOptions = {
      android: { "senderID": 'MY_SENDER_ID' },
      ios: {
        alert: 'true',
        badge: true,
        sound: 'false'
      },
      windows: {},
      browser: {}
    };

    const pushObject: PushObject = this.push.init(options);
    pushObject.on('notification').subscribe((notification: any) => {
    console.log('Received a notification: ' + JSON.stringify(notification));
    });

    pushObject.on('registration').subscribe((registration: any) => {
      this.registration = registration;
      console.log('Device registered: ' + JSON.stringify(registration));
    });

    pushObject.on('error').subscribe(error => {
      console.log('Error with Push plugin ' + error);
    });

config.xml

<plugin name="phonegap-plugin-push" spec="2.2.3">
        <variable name="SENDER_ID" value="MY_SENDER_ID" />
    </plugin>

more details:
ionic 4
phonegap-plugin-push 2.2.3

i run the app on virtual device.

i’m getting error in the app-

’String resource ID #0x0

Can everyone help me?

Posts: 1

Participants: 1

Read full topic

Cannot style ion-item on Ionic 4 (set background)

$
0
0

@savetheday wrote:

It’s not possible to set the background (color) of ion-item using css.
This doesn’t work:

<ion-item style="background-color:red;">

But setting the color does work:

<ion-item style="color:white;">

Is there a way to set the background?

Posts: 1

Participants: 1

Read full topic

[ionic 4 ] Not found : cordova-plugin-play-games-service

$
0
0

@doug1e wrote:

I use the latest ionic 4 and when I try to install the Google Play Games Services, I get the following error:

npm ERR! 404 ‘cordova-plugin-play-games-service’ is not in the npm registry.

Is this something missing from ionic 4?

Thanks,

Doug

Posts: 1

Participants: 1

Read full topic

Detail page ionic 4 master version help me

$
0
0

@muratcankuruoffical wrote:

home.page.html
<ion-grid *ngFor=“let item of items” >

{{item.rank}} imag hi, help me please. {{item.id}} {{item.price_usd}}

home.page.ts

export class HomePage {
public items:any;
constructor(public navCtrl: NavController, public http: HttpClient, public modalController: ModalController) {
/*this.items = [
{title: “Murat”}
]
*/
this.loadData();
}

loadData() {
	let data:Observable<any>;
	data = this.http.get('https://api.coinmarketcap.com/v1/ticker/');
	data.subscribe(result => {
		this.items = result;
	})
}

}

I got the data. but I could not make a detail page.
web as example

detail.php

echo $_GET[‘id’];
i want like that

Posts: 1

Participants: 1

Read full topic

CORS issue in ionic4

$
0
0

@shafiul2344 wrote:

I am using Angularfire 2 and calling cloud function from my ionic 4 app.How to solve the following CORS issue in ionic 4 ??

Access to fetch at ‘https://null-myionicshop-693bc.cloudfunctions.net/subscribeToTopic’ from origin ‘http://localhost:8100’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. If an opaque response serves your needs, set the request’s mode to ‘no-cors’ to fetch the resource with CORS disabled.

Posts: 1

Participants: 1

Read full topic

Viewing all 48980 articles
Browse latest View live


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