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

Previous page within sideMenu

$
0
0

@Josloader3 wrote:

Hey guys, I use the sideMenu template from Ionic 4 and I notice if you navigate all the page and later press the button back from your device, this backward page by page until reach the first.
The same problem are in the Tabs template.
What I need to config to avoid this?
I want close the app instantly or back to a login page when the user press the back button in the menu page.
Thank you so much, I’m new with this framework and sorry by my bad english.

Posts: 1

Participants: 1

Read full topic


TypeError: content.ionScrollStart.takeUntil is not a function

How to close or stop an iframe from playing on tab change?

$
0
0

@adbriceno wrote:

i have html audio player in my first tab. how do i stop it from playing audio when i go to another tab??

Posts: 1

Participants: 1

Read full topic

API Request Being Blocked

$
0
0

@zyzmoz wrote:

Hello!

I’m stuck here with a CORB that occurs during API request through web browser while testing.
This problem started suddenly, and I don’t even know how to solve it without server changes! The app works well using ionic cordova run -l though.

Additionally I’ve tried to use CORS chrome extensions but it seems not effective.

So, if some one could lend me a hand I will be grateful!

Thanks in advance!

Posts: 1

Participants: 1

Read full topic

Ios 12.1.4 white screen

$
0
0

@pe1 wrote:

hi, i have a problem when running the app on my ipad after updating ios 12.1.4 - getting a white screen without any errors. However the app works fine on simulator and iPhone 12.1.2. Also i can normally build the app and upload to testfligh, installations work fine on any device with ios < 12.1.4. Any tips?

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 7.1.0 

local packages:

    @ionic/app-scripts : 3.1.2
    Cordova Platforms  : android 6.4.0 ios 4.5.3
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 26.1.1
    ios-deploy        : 1.9.2 
    ios-sim           : 5.0.13 
    Node              : v6.14.3
    npm               : 3.10.10 
    OS                : macOS High Sierra
    Xcode             : Xcode 10.1 Build version 10B61 

Environment Variables:

    ANDROID_HOME : /Users/artur/Library/Android/sdk

Misc:

    backend : legacy

Posts: 1

Participants: 1

Read full topic

Issue when run ionic serve

$
0
0

@chilupa wrote:

When run with the command ionic serve I was getting the below error. However I tried to install node-sass with the command npm i node-sass but nothing seem to work.

Could anyone please advise what I’m missing here. Appreciate the help!

> ng run app:serve --host=0.0.0.0 --port=8100
[ng] WARNING: This is a simple server for use in testing or debugging Angular applications
[ng] locally. It hasn't been reviewed for security issues.
[ng] Binding this server to an open connection can result in compromising your application or
[ng] computer. Using a different host than the one passed to the "--host" flag might result in
[ng] websocket connection issues. You might need to use "--disableHostCheck" if that's the
[ng] case.

[INFO] Development server running!
       
       Local: http://localhost:8100
       External: http://10.77.222.52:8100
       
       Use Ctrl+C to quit this process

[INFO] Browser window opened to http://localhost:8100!

[ng] ℹ 「wdm」: wait until bundle finished: /
[ng] Date: 2019-02-21T20:22:02.525Z
[ng] Hash: 09d9ad68db9f0d5aae6a
[ng] Time: 12006ms
[ng] 
[ng] ERROR in ./src/global.scss (./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./node_modules/sass-loader/lib/loader.js??ref--14-3!./src/global.scss)
[ng] Module build failed (from ./node_modules/sass-loader/lib/loader.js):
[ng] Error: Cannot find module 'node-sass'
[ng]     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
[ng]     at Function.Module._load (internal/modules/cjs/loader.js:507:25)
[ng]     at Module.require (internal/modules/cjs/loader.js:637:17)
[ng]     at require (internal/modules/cjs/helpers.js:22:18)
[ng]     at Object.sassLoader (/Users/pavanchilukuri/Ionic Apps/myApp/node_modules/sass-loader/lib/loader.js:46:72)
[ng] ERROR in ./src/theme/variables.scss (./node_modules/@angular-devkit/build-angular/src/angular-cli-files/plugins/raw-css-loader.js!./node_modules/postcss-loader/src??embedded!./node_modules/sass-loader/lib/loader.js??ref--14-3!./src/theme/variables.scss)
[ng] Module build failed (from ./node_modules/sass-loader/lib/loader.js):
[ng] Error: Cannot find module 'node-sass'
[ng]     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
[ng]     at Function.Module._load (internal/modules/cjs/loader.js:507:25)
[ng]     at Module.require (internal/modules/cjs/loader.js:637:17)
[ng]     at require (internal/modules/cjs/helpers.js:22:18)
[ng]     at Object.sassLoader (/Users/pavanchilukuri/Ionic Apps/myApp/node_modules/sass-loader/lib/loader.js:46:72)
[ng] ERROR in ./src/app/home/home.page.scss
[ng] Module build failed (from ./node_modules/sass-loader/lib/loader.js):
[ng] Error: Cannot find module 'node-sass'
[ng]     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
[ng]     at Function.Module._load (internal/modules/cjs/loader.js:507:25)
[ng]     at Module.require (internal/modules/cjs/loader.js:637:17)
[ng]     at require (internal/modules/cjs/helpers.js:22:18)
[ng]     at Object.sassLoader (/Users/pavanchilukuri/Ionic Apps/myApp/node_modules/sass-loader/lib/loader.js:46:72)
[ng] chunk {common} common.js, common.js.map (common) 18.5 kB  [rendered]
[ng] chunk {home-home-module} home-home-module.js, home-home-module.js.map (home-home-module) 6.51 kB  [rendered]
[ng] chunk {list-list-module} list-list-module.js, list-list-module.js.map (list-list-module) 5.77 kB  [rendered]
[ng] chunk {main} main.js, main.js.map (main) 32.9 kB [initial] [rendered]
[ng] chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 237 kB [initial] [rendered]
[ng] chunk {runtime} runtime.js, runtime.js.map (runtime) 8.83 kB [entry] [rendered]
[ng] chunk {styles} styles.js, styles.js.map (styles) 19.4 kB [initial] [rendered]
[ng] chunk {vendor} vendor.js, vendor.js.map (vendor) 4.35 MB [initial] [rendered]
[ng] ℹ 「wdm」: Failed to compile.

Posts: 2

Participants: 1

Read full topic

Adding "Simple Sharing" to an app?

$
0
0

@SubEffect wrote:

This is not adding a sharing button, this is adding the ability for other apps to pick up your app and share with it.

See here: https://developer.android.com/training/sharing/send.html

I’m not sure if this exists in iOS, but it’s a staple in Android.

The easy way to explain it is you give your app the ability to be “seen” by other apps. E.g. If you open Twitter and share you can “share via…” and you’ll get a big modal with loads of apps you can share to. These are not integrated into Twitter, but are a general sharing pool.

I’ve a client with a browser extension and I’d like to build an app that allows for sharing to this extension from within other apps.

Anyone have any idea how this is done in Ionic? Preferably Ionic 4…

Posts: 1

Participants: 1

Read full topic

Firebase Facebook OAuth Returns null On iOS Devices

$
0
0

@claybanks1989 wrote:

I’ve got a Firebase web application that uses the following method to authenticate user’s via Facebook

  let provider = new firebase.auth.FacebookAuthProvider();
    provider.addScope('public_profile');
    provider.addScope('user_location');
    firebase.auth().signInWithRedirect(provider)
      .then(function(){
        return firebase.auth().getRedirectResult()
      })
      .then(function(result) {
          console.log('Logged in user ::: ', result.user);
      })
      .catch(err => { console.warn('An error occurred') })
    })

However, all iOS devices and emulateors (except one, strangely) never retrieve the user object - instead I get null

  • I’ve enabled Facebook as a Sign-in Provider in the Firebase console
  • I’ve added my app’s domain, facebook.com, and localhost as Authorized domains in the Firebase console
  • I’ve tried repositioning getRedirectResult() and utilizing the onAuthStateChanged() methods, but to no avail

Has anyone run into a similar issue?

Posts: 1

Participants: 1

Read full topic


Remove shadow from ion-searchbar (material design)

$
0
0

@davidgeller wrote:

I’m having trouble finding the CSS Shadom DOM variables in Ionic4 that can help me remove the [actual] shadow from the ion-searchbar component in md mode. Have gone through joshmorony’s articles and videos and haven’t found a solution, yet. Any suggestions?

Posts: 1

Participants: 1

Read full topic

Open url in the app

$
0
0

@RenzoM78 wrote:

Hello all,

I have an app that create cards with short data and when click on it I want to use an in app browser sort of thing. Is the only way to use InAppBrowser plugin or are there also other/better ways to do that?

Posts: 1

Participants: 1

Read full topic

Ionic 3 and Node version

$
0
0

@adsfelipe wrote:

Currently im using ionic 3 with node version 8.11.3.
i was wondering if i get the latest version(10.15.1), if ionic 3 would brake?
i google around, but couldn’t find anything about it…
thanks all

Posts: 1

Participants: 1

Read full topic

HTTP Post with form data on iOS renders an incomplete request body when ‘=’ character exists anywhere in the form data.

$
0
0

@daustinstreamlinx wrote:

Environment Info:
cli packages:

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1) 

local packages:

@ionic/app-scripts : 3.1.8
Cordova Platforms  : ios 4.5.5
Ionic Framework    : ionic-angular 3.9.2

System:

ios-sim : 6.1.2
Node    : v10.12.0
Npm     : 6.4.1
OS       : macOS High Sierra
Xcode  : Xcode 9.4 Build version 9F1027a 

Relevant plugins:

cordova-plugin-advanced-http 1.11.1
cordova-plugin-ionic-webview 1.2.1

@angular/http 5.0.3
@ionic-native/http 4.5.3
ionic-native-http-connection-backend 4.0.3

We are attempting to use http.post to send some form data as json. When any string in that json contains an “=” character, http.post seems to be mangling it. The server on the other end only receives the post body up until the point of the “=” character with nothing else afterward.

This issue only happens with ios; our android, chrome and windows builds all function without a problem. We suspect that this is heavily related to the combination of the cordova-plugin-ionic-webview and cordova-plugin-advanced-http plugins and the ionic-native-http-connection-backend which only come into play on ios. We updated our app to use the webview plugin to address some performance concerns. However, after switch to that library we found that it broke every network transaction with CORS issues and other problems, which eventually lead us to using the other libraries mentioned in this ticket.

Here is a simplified example of hour our http post code:

import { Headers, Http, RequestOptions, URLSearchParams } from ‘@angular/http’;

  const post_payload = {
    parameter: 'example = string'
  };
  const data = new URLSearchParams();
  data.append('post', JSON.stringify(post_payload));
  const options = new RequestOptions({
    headers: headers,
    withCredentials: true
  });
  this.http.post('https://example.url', data.toString(), options)
  .subscribe(response => {
    //handle response
  }, (error) => {
    //handle error
  });

The post request completes, but the post body renders as:
{post: {parameter: ‘example

We have also tried adding the post_payload directly to the data.append(), we have tried forgoing URLSearchParams() entirely and just adding the post_payload object directly and after having been stringified, and we’ve also tried sending the data object without a toString().

Here is what our app.module.ts looks like:

import { HttpModule, JsonpModule } from ‘@angular/http’;
import { NativeHttpFallbackD, NativeHttpModuleD } from ‘ionic-native-http-connection-backend’;
import { Http, RequestOptions } from ‘@angular/http’;

providers: [
DatePicker,
StatusBar,
SplashScreen,
Device,
{ provide: ErrorHandler, useClass: IonicErrorHandler },
Camera,
CameraPreview,
File,
FilePath,
FileTransfer,
MediaCapture,
{provide: Http, useClass: Http, deps: [NativeHttpFallbackD, RequestOptions]}
]

I’ve tried bringing all relevant plugins and libraries up to the most recent version. I’ve tried removing the ionic-native-http-connection-backend (but this causes lots of CORS issues and causes http calls to not share cookies with file-transfer plugin which is itself stalled on being replaced because we can’t get blob data transfers to function).

Right now I’m at a loss where to continue to look. Our android and windows builds simply do not contain the bottom “provide” line in app.module.ts and these posts are working without an issue, which leads us to believe that it’s the ionic-native-http-connection-backend library causing the issue. However we can’t remove that library because it is the only thing which seems to allow our CORS requests to succeed when we’re using cordova-plugin-ionic-webview which is a hard requirement at the moment.

Posts: 2

Participants: 2

Read full topic

IONIC 4 - Cordova file plugin

$
0
0

@ratedam wrote:

Hello!
I’m currently trying an app on ionic 4 and i need to use the file plugin (https://ionicframework.com/docs/native/file/).

Here’s what i made:

  • Installed the required packages with ionic cordova plugin add cordova-plugin-file && npm install @ionic-native/file
  • On my class i put the following:
import { Injectable } from '@angular/core';
import { File } from '@ionic-native/file';

@Injectable({
  providedIn: 'root'
})
export class BaseModelService {
  constructor(private file: File) { }

  save(){
      return this.file.writeFile(this.file.dataDirectory, 'hello.json', JSON.stringify({test:'value'}), {replace:true})

  }
}

In my page class i after some logic i simply call

basemodelservice.save();

And i get the error

ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'writeFile' of undefined

What am i doing wrong? Thank you!

Posts: 2

Participants: 2

Read full topic

App run slowly after use

$
0
0

@phongbn96 wrote:

I have ionic app.It was writed by ionic3. Firstly , it run very good and fast but after use time, app run slowly and dont use any controller
Please help mee !

Posts: 1

Participants: 1

Read full topic

How to apply fix of later version ionic to previous version in project

$
0
0

@john33john33 wrote:

Problem:
Run into a ionic bug https://github.com/ionic-team/ionic/issues/12072 in 3.8.
However, solution mentioned not work.
Fix related released in 4.x and I would like to apply it in current project.

Objective:

  1. Apply / copy code fix to local project
  2. Make ionic a local module to be install instead of official source.
  3. Other uses “npm install” would install the modified node module after pull source

Other Solution:

  1. Make a hook copy the fix each time building the project by replacing line.
    But risk that any mis-replace would crash the project.

Is there a official / recommended way to modify ionic?
(not upgrading ionic)

Thanks

Posts: 1

Participants: 1

Read full topic


My app is full of bug on first launch and work normally on 2nd launch

$
0
0

@F4OST wrote:

Hi!

So I’m trying to export my application on the apple console and I succed to do it but I have a problem:

when I launch the app for the first time there are a lot of bugs (buttons not working, tap everywhere on the screen to could open the keyboard in a form, picture not displayed, etc…).

But when I kill it and open it again everything works perfectly! So I don’t understand what’s happening…
It all started when I started using XCode 10, before with the 9 I wasn’t having this problem.

And I don’t have this problem on Android, only iOS when I test the application on Test Flight.

Env:

  • MacOS Mojave 10.14.3
  • XCode 10.1
  • Cordova 8.1.2
  • Ionic 4.10.3

Command I used to build:


ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0" -prod -release

Posts: 1

Participants: 1

Read full topic

How to disable screenshot and screen recorder in our ionic 3 app?

$
0
0

@karthikaivel wrote:

Hi,
I have one ionic v3 application. I need to disable for users have tack screenshot and screen recording video.
How to disable that.Please give me a correct solution.
Thank you!.

Posts: 1

Participants: 1

Read full topic

Side menu routing error

$
0
0

@nizalsha wrote:

ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: ‘main’
Error: Cannot match any routes. URL Segment: ‘main’.

Posts: 1

Participants: 1

Read full topic

No cordova plugin working with ionic-native for ionic3 ios project

$
0
0

@mayurbaldha wrote:

Current behavior:
None of plugins can be called from .ts files
for all plugins, If you call plugin it says
Ionic Native: tried calling StatusBar.styleDefault, but the StatusBar plugin is not installed.

Expected behavior:
Plugins should work like mentioned at

Steps to reproduce:

No cordova plugin working with ionic-native for ionic3 ios project
use package.json as below

{
  "name": "HelloWorld",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "start": "ionic-app-scripts serve",
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "lint": "ionic-app-scripts lint"
  },
  "dependencies": {
    "@angular/animations": "5.2.11",
    "@angular/common": "5.2.11",
    "@angular/compiler": "5.2.11",
    "@angular/compiler-cli": "^7.2.6",
    "@angular/core": "5.2.11",
    "@angular/forms": "5.2.11",
    "@angular/http": "5.2.11",
    "@angular/platform-browser": "5.2.11",
    "@angular/platform-browser-dynamic": "5.2.11",
    "@ionic-native/core": "^4.20.0",
    "@ionic-native/device": "^4.20.0",
    "@ionic-native/file": "^4.20.0",
    "@ionic-native/file-chooser": "^4.20.0",
    "@ionic-native/file-opener": "^4.20.0",
    "@ionic-native/file-path": "^4.20.0",
    "@ionic-native/file-transfer": "^4.20.0",
    "@ionic-native/http": "^4.20.0",
    "@ionic-native/network": "^4.20.0",
    "@ionic-native/splash-screen": "^4.20.0",
    "@ionic-native/sqlite": "^4.20.0",
    "@ionic-native/status-bar": "^4.20.0",
    "@ionic/storage": "2.2.0",
    "cordova-android": "7.1.4",
    "cordova-ios": "4.5.5",
    "cordova-plugin-advanced-http": "2.0.4",
    "cordova-plugin-device": "2.0.2",
    "cordova-plugin-file": "6.0.1",
    "cordova-plugin-file-opener2": "2.2.0",
    "cordova-plugin-file-transfer": "1.7.1",
    "cordova-plugin-filechooser": "1.2.0",
    "cordova-plugin-filepath": "1.5.1",
    "cordova-plugin-ionic-keyboard": "^2.1.3",
    "cordova-plugin-ionic-webview": "^3.1.2",
    "cordova-plugin-network-information": "2.0.1",
    "cordova-plugin-splashscreen": "5.0.2",
    "cordova-plugin-statusbar": "2.4.2",
    "cordova-plugin-whitelist": "^1.3.3",
    "cordova-sqlite-storage": "3.1.0",
    "ionic-angular": "3.9.3",
    "ionicons": "3.0.0",
    "moment": "^2.24.0",
    "rxjs": "5.5.11",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.29"
  },
  "devDependencies": {
    "@ionic/app-scripts": "^3.2.2",
    "typescript": "~2.6.2"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-advanced-http": {},
      "cordova-plugin-device": {},
      "cordova-plugin-file": {},
      "cordova-plugin-file-opener2": {},
      "cordova-plugin-file-transfer": {},
      "cordova-plugin-filechooser": {},
      "cordova-plugin-filepath": {},
      "cordova-plugin-network-information": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-statusbar": {},
      "cordova-sqlite-storage": {},
      "cordova-plugin-whitelist": {},
      "cordova-plugin-ionic-webview": {},
      "cordova-plugin-ionic-keyboard": {}
    },
    "platforms": [
      "android",
      "ios"
    ]
  }
}

Related code:

Other information:

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):



Ionic:

   ionic (Ionic CLI)  : 4.10.3 (/usr/local/lib/node_modules/ionic)
   Ionic Framework    : ionic-angular 3.9.3
   @ionic/app-scripts : 3.2.2

Cordova:

   cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
   Cordova Platforms     : android 7.1.4, ios 4.5.5
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 11 other plugins)

System:

   ios-deploy : 1.9.4
   NodeJS     : v10.15.0 (/usr/local/bin/node)
   npm        : 6.7.0
   OS         : macOS Mojave
   Xcode      : Xcode 10.1 Build version 10B61

Posts: 1

Participants: 1

Read full topic

How to fix my ion badge for cart is not updating in real time and requires navigation from other pages to be updated?

$
0
0

@aditbharadwaj wrote:

whenever i add any product in the cart, the shopping cart icon doesn’t update in real time to show that a product is added but needs a refresh of the view by navigating to any other page and coming back then only the ion -badge value is set 1.

<button ion-button icon-only (click)="cart()">    
<ion-icon name="cart"></ion-icon>
<ion-badge id="notifications-badge" style="font-size:1rem" *ngif="ccount">{{ccount}}</ion-badge>
</button>


//SETTING CART LENGTH

    this.storage.get('products').then((data) => {
      if(data != null)
        this.ccount = data.length;
      else
        this.ccount = 0;
    });

//code after pressing the add to cart button

showAlert() {
      let alert = this.alertCtrl.create({
        title: 'Product Added!',
      subTitle: 'Added To Cart Successfully!',
      buttons: ['OK']
    });
this.updateStorage(this.productdetail).catch(reason = console.error(reason));
      alert.present();
      this.changeDetector.detectChanges();
  }

Posts: 1

Participants: 1

Read full topic

Viewing all 70442 articles
Browse latest View live


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