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

Prod Build without Minify

$
0
0

@Dovel wrote:

Is it possible to build --prod without minify? The sourcemap doesn’t help. I’ve an error from vendor.js in prod-build only.

Posts: 1

Participants: 1

Read full topic


Issue with the BarcodeScanner plugin

$
0
0

@leidyj0923 wrote:

Hi, i have a problem with BarcodeScanner plugin:

  1. When i try to make import
    import { BarcodeScanner } from ‘@ionic-native/barcode-scanner’;

in the constructor i can see “Cannot find name ‘BarcodeScanner’”, before i have intalled the plugin this way:

ionic cordova plugin add phonegap-plugin-barcodescanner
npm install @ionic-native/barcode-scanner

  1. The editor show me a observation, for example, to use:
    import { BarcodeScanner } from ‘@ionic-native/barcode-scanner/ngx’;

I try this, but in the browser, i get this error:

HomePage.html:10 ERROR TypeError: Object(…) is not a function
at BarcodeScanner.scan (index.js:34)
at HomePage.webpackJsonp.272.HomePage.scan (home.ts:19)
at Object.eval [as handleEvent] (HomePage.html:10)
at handleEvent (core.js:13589)
at callWithDebugContext (core.js:15098)
at Object.debugHandleEvent [as handleEvent] (core.js:14685)
at dispatchEvent (core.js:10004)
at core.js:10629
at HTMLButtonElement. (platform-browser.js:2628)
at t.invokeTask (polyfills.js:3)

¡help please!

PD: Sorry, i do not speak English, i hope understand me and help me. thanks a lot

Posts: 1

Participants: 1

Read full topic

Ionic 4 document web site not view

Have on-screen keyboard for browser build?

$
0
0

@mikexskamato wrote:

Hi all -

Apologies if this is the wrong channel for a post such as this but I’m looking for some on advice on how to accomplish this without needing to re-build an entirely separate code base.

I’m working on an application for a project where we’re looking to have iOS, Android AND Browser support for the app. For iOS/Android this is very simple because they have their device keyboard present. The browser portion will be displayed on a touch screen monitor running on a Browser via Mediastar device.

What would be the easiest way to have a virtual keyboard displayed for users to be able to input the request data on said screen?

First thought would be to leverage something like this Virtual Keyboard:

Is it possible to integrate something like this jQuery Keyboard into an Ionic Project?

Thanks all,
-Mike

Posts: 1

Participants: 1

Read full topic

Effect like Action Sheet - Ionic 4

$
0
0

@julianacristina8 wrote:

Hi, I need to put some inputs inside an Action Sheet, but I know that isn’t possible. How can I do something like a Action Sheet Effect in Ionic 4?

Posts: 1

Participants: 1

Read full topic

[Ionic4] Deeplink not working in production

$
0
0

@mrflow wrote:

Hey guys, I am facing an issue with deeplinks (Angular router). They work perfectly when I run ionic serve . However, when I run ionic build and then serve the www folder with either nginx on my vps, or with the serve npm module in local, deeplinks dont work. Indeed, if i try to reach /mypage manually it throws 404 error.

Do you guys have any idea why this is not working ?

Posts: 2

Participants: 2

Read full topic

Sqlite: Uncaught (in promise): TypeError: Cannot read property 'split' of undefined TypeError:

$
0
0

@ashutosh10g wrote:

I followed this tutorial https://ionicframework.com/docs/native/sqlite but after clicking a button when I call a function to create a table then I am getting below error, please help me to solve this issue:

Runtime Error
Uncaught (in promise): TypeError: Cannot read property ‘split’ of undefined TypeError: Cannot read property ‘split’ of undefined at get (http://192.168.43.113:8100/build/vendor.js:57299:22) at getPlugin (http://192.168.43.113:8100/build/vendor.js:57331:12) at checkAvailability (http://192.168.43.113:8100/build/vendor.js:67875:86) at http://192.168.43.113:8100/build/vendor.js:91789:102 at SQLite.create (http://192.168.43.113:8100/build/vendor.js:91794:11) at http://192.168.43.113:8100/build/5.js:164:42 at t.invoke (http://192.168.43.113:8100/build/polyfills.js:3:14976) at Object.onInvoke (http://192.168.43.113:8100/build/vendor.js:5445:33) at t.invoke (http://192.168.43.113:8100/build/polyfills.js:3:14916) at r.run (http://192.168.43.113:8100/build/polyfills.js:3:10143)
Stack
Error: Uncaught (in promise): TypeError: Cannot read property ‘split’ of undefined
TypeError: Cannot read property ‘split’ of undefined
at get (http://192.168.43.113:8100/build/vendor.js:57299:22)
at getPlugin (http://192.168.43.113:8100/build/vendor.js:57331:12)

controller ts file

import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams, Platform } from 'ionic-angular';
import { SQLite, SQLiteObject } from '@ionic-native/sqlite/ngx';

@IonicPage()
@Component({
  selector: 'page-stats',
  templateUrl: 'stats.html'
})
export class StatsPage {
  currentItems: any = [];

  data = { date: '', type: '', description: '', amount: 0 };
  constructor(
    private platform: Platform,
    public navCtrl: NavController,
    private sqlite: SQLite,
    public navParams: NavParams
  ) {}

  addData() {
    alert('called');
    return new Promise((resolve, reject) => {
      this.platform.ready().then(val => {
        alert('called2'); // upto this i am getting alert but after this it throws error
        this.sqlite.create({
          name: 'data.db',
          location: 'default'
        })
          .then((db: SQLiteObject) => {
            db.executeSql('create table danceMoves(name VARCHAR(32))', [])
              .then(() => console.log('Executed SQL'))
              .catch(e => console.log(e));
          })
          .catch(e => console.log(e));
      });
    });
  }
}

app.module.ts

import { HttpClient, HttpClientModule } from '@angular/common/http';
import { ErrorHandler, NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { Camera } from '@ionic-native/camera';
import { SplashScreen } from '@ionic-native/splash-screen';
import { StatusBar } from '@ionic-native/status-bar';
import { SQLite } from '@ionic-native/sqlite/ngx';
import { IonicStorageModule, Storage } from '@ionic/storage';
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
import { Items } from '../mocks/providers/items';
import { Settings } from '../providers';
import { MyApp } from './app.component';
import { Toast } from '@ionic-native/toast/ngx';
// The translate loader needs to know where to load i18n files
// in Ionic's static asset pipeline.
export function createTranslateLoader(http: HttpClient) {
  return new TranslateHttpLoader(http, './assets/i18n/', '.json');
}

export function provideSettings(storage: Storage) {
  /**
   * The Settings provider takes a set of default settings for your app.
   *
   * You can add new settings options at any time. Once the settings are saved,
   * these values will not overwrite the saved values (this can be done manually if desired).
   */
  return new Settings(storage, {
    option1: true,
    option2: 'Ionitron J. Framework',
    option3: '3',
    option4: 'Hello'
  });
}

@NgModule({
  declarations: [
    MyApp
  ],
  imports: [
    BrowserModule,
    HttpClientModule,
    TranslateModule.forRoot({
      loader: {
        provide: TranslateLoader,
        useFactory: (createTranslateLoader),
        deps: [HttpClient]
      }
    }),
    IonicModule.forRoot(MyApp),
    IonicStorageModule.forRoot()
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp
  ],
  providers: [
    Items,
    Camera,
    SplashScreen,Toast,
    StatusBar,
    { provide: Settings, useFactory: provideSettings, deps: [Storage] },
    // Keep this to enable Ionic's runtime error handling during development
    { provide: ErrorHandler, useClass: IonicErrorHandler },
    SQLite
  ]
})
export class AppModule { }

package.json

{
  "name": "bmi2",
  "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": "5.2.11",
    "@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/camera": "4.3.3",
    "@ionic-native/core": "~4.18.0",
    "@ionic-native/splash-screen": "~4.18.0",
    "@ionic-native/sqlite": "^5.0.0",
    "@ionic-native/status-bar": "~4.18.0",
    "@ionic-native/toast": "^5.0.0",
    "@ionic/storage": "^2.2.0",
    "@ngx-translate/core": "8.0.0",
    "@ngx-translate/http-loader": "^2.0.0",
    "cordova-android": "7.1.4",
    "cordova-plugin-device": "^2.0.2",
    "cordova-plugin-ionic-keyboard": "^2.1.3",
    "cordova-plugin-ionic-webview": "^2.3.2",
    "cordova-plugin-splashscreen": "^5.0.2",
    "cordova-plugin-statusbar": "^2.4.2",
    "cordova-plugin-whitelist": "^1.3.3",
    "cordova-plugin-x-toast": "2.7.2",
    "cordova-sqlite-storage": "2.6.0",
    "ionic-angular": "3.9.2",
    "ionicons": "3.0.0",
    "rxjs": "5.5.11",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.26"
  },
  "devDependencies": {
    "@ionic/app-scripts": "3.2.1",
    "typescript": "~2.6.2"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-whitelist": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {
        "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
      },
      "cordova-plugin-ionic-keyboard": {},
      "cordova-sqlite-storage": {},
      "cordova-plugin-x-toast": {}
    },
    "platforms": [
      "android"
    ]
  }
}

Version info

ionic (Ionic CLI) : 4.8.0 (C:\Users\Ashutosh\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.4
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.3.2, (and 6 other plugins)

System:

Android SDK Tools : 26.1.1 (D:\androidSDK)
NodeJS : v10.13.0
npm : 6.4.1
OS : Windows 8.1

Posts: 1

Participants: 1

Read full topic

Getting entire URL instead last key passing data Navparams

$
0
0

@Manel00 wrote:

Hi everyone,

I’d like to send pass data from one page to another one, the problem is via NavParams im passing ENTIRE URL, and just what i want is the last parameter (a key), let me show you my code:

previous page:
addVehicle(vehicle: Vehicle) {
return this.vehicleListRef.push(vehicle)
.then(newVehicleDetails => this.navCtrl
.setRoot(HomePage, {newVehicleParams: newVehicleDetails}));
}

next page:
this.newVehicleParams = this.params.get(‘newVehicleParams’);

I’m getting https://XXXXXXXXXXXXXXXXX.firebaseio.com/XXXXX/-LX06l5lWHATSIaQVn9qW instead ‘-LX06l5lWHATSIaQVn9qW’, How could I take just the end of this URL? Thank you so much

Posts: 1

Participants: 1

Read full topic


Ionic 3 share from social network TO an ionic app

$
0
0

@smobydick wrote:

Hello,

I found documentation to add share plugin, to share something from my ionic app to facebook, twitter, intagram etc. But I found nothing about sharing things from intagram/twitter/facebook TO my ionic app.

Can you guide me please ?

Posts: 1

Participants: 1

Read full topic

How to add a background image to Ionic 4

$
0
0

@erald123 wrote:

Hello everyone,recently I switched to Ionic 4.But I have a problem for adding a background image to a page.I tried one solution posted in the forum Ionic 4 - Header background image but doesn’t worked.
Here’s my code:

<ion-content class="background-image" no-scroll padding>

</ion-content>

:host {
  .background-image {
    background: url('../assets/imgs/carp.jpg') no-repeat 100% 100%;
  }
}

when I try this is giving me an error:


Any suggestion
Thanks!

Posts: 2

Participants: 2

Read full topic

HTTPS POST requests not working in release build

$
0
0

@Thadah wrote:

Hi there, I’m having a lot of trouble trying to make https post requests to an API work in production builds of the app.
The app works perfectly in the debug build.

These are the Ionic and Cordova versions

Ionic:

   ionic (Ionic CLI)  : 4.9.0 (/usr/lib/node_modules/ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.0

Cordova:

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

System:

   NodeJS : v11.6.0 (/usr/bin/node)
   npm    : 6.6.0
   OS     : Linux 4.19

The https post requests are made through the Angular http library.

I’ve tested solutions that can be found in the following threads:



The solutions applied were:

http://ivancevich.me/articles/ignoring-invalid-ssl-certificates-on-cordova-android-ios/

Adding CSP to the index.html

<meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; connect-src *; img-src 'self' data:; style-src 'self'; font-src 'self';">

But with no luck.
The certificate used in the webpage where the API is stored is from Let’s Encrypt, is it compatible?

Am I just missing something here?

Posts: 1

Participants: 1

Read full topic

Issue with the fabric js plugin

$
0
0

@vekton1234 wrote:

Hello guys, this is my first time creating a post here. So , I was trying to create new blank app, and install fabric js, but when I ran npm install fabric --save, I got this message:
MSBUILD : error MSB3428: Could not load the Visual C++ component “VCBuild.exe”. To fix this, 1) install the .NET Framework 2.0 SDK, 2) inst
all Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere. [C:\nova\node_mo
dules\canvas\build\binding.sln]
This is a new blank app , so there are no previous plugins that could be responsible for this error. If you could help me fix this, that woud be great

Posts: 1

Participants: 1

Read full topic

CORS issue in ionic 4 while dealing with firebase cloud functions

$
0
0

@shafiul2344 wrote:

Pls help me with this issue.

“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

How to use InAppBrowser in ionic 4?

$
0
0

@karthikaivel wrote:

Hi,
I need full documentation of using InAppBrowser using ionic-v4 application.and also i need explanation of InAppBrowser plugin…Give me a solution as soon as possible,Thank you…

Posts: 1

Participants: 1

Read full topic

I want no padding in scroll-content!


Video Compression in Ionic 3

$
0
0

@vaish_sv wrote:

Hi , I am developing a hybrid application,which includes video processing as one of its feature.
I am interested to know if there are any plugins available for video compression

Thank you

Posts: 1

Participants: 1

Read full topic

Ionic 4 scroll to the bottom

Use android component styles for iOS platform also

$
0
0

@nikhil7 wrote:

Hi,
I want use ion-segment android component style to ios platform also by overriding its default styles.

android ios

I want to use same styles as in picture 1 to ios platform.
How it can be achieve.

Posts: 1

Participants: 1

Read full topic

Ionic 4 Folder structure

$
0
0

@martinstolz wrote:

ionic 4 “ionic start …” generates no subfolders below /src app, such as ‘/page’, ‘/service’ etc. Also “ionic generate …” places new elements in /src/app/. Did I miss something?

Posts: 1

Participants: 1

Read full topic

Only just the blank page

Viewing all 48980 articles
Browse latest View live


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