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

How to add custom icons to ion-icons in ionic-v4

$
0
0

@michaelkariv wrote:

Alongside excellent ion-icons I would like to use my own. I have them both as SVG and also as an icon font (done using icomoon.io online font builder).

Important to me is to make my icons adhere to the theme (using color defaults) but also be stylable with specific colors (using color attribute)

in ionic-v3 it was done using css+font. In ionic-v4, I am told (on ionic slack forum, by mike) icon font is no longer an option. Suggestion is to use src attribute just so:

<ion-icon src="/path/to/external/file.svg"></ion-icon>

The problem with it, besides being less elegant then just using the ‘name’ attribute is styling - it does not react to color attribute. I tried it.

Options that I considered are

  1. forking ion-icon repo. I hate it because I want downstream fixes
  2. forking font awesome angular control. Not good because I want the same attributes as ion-icon
  3. as above, except wrapping into something e.g. div that uses ionic styling. doable but a gut feeling there must be a better solution

Ideally, IMHO, ion-icon should be split into a web component for any set of gliphs adhering to certain principles (e.g. naming, that will make switching between ios and mg easy), AND a separate extendable set of icon glyphs.

Mike suggested I do a pull request. Before I do so, I would like to hear your opinions.

Posts: 1

Participants: 1

Read full topic


How to add http headers in img tag or ion-img tag

$
0
0

@yashkatta wrote:

I want add the Authorization header in img tag so that it can access the images from remote server with https protocol.

Posts: 1

Participants: 1

Read full topic

Login Issue with IOS

$
0
0

@surumulluprudhviraj wrote:

I’m building a login form which is sending the data to the HTTP login service. It’s working very well on Android devices but on IOS it tells me that email, password, and device_id is required so the HTTP request is don’t but not sending form data while it’s successful in Android with a status code of 200. Does anybody have any idea why this is happening?

Posts: 1

Participants: 1

Read full topic

How To assign a response from storage to a variable

$
0
0

@harshm90 wrote:

I tried few methods to assign values to variable but could succeed please help.

Method 1:-

getData() {
    return this.storage.get('products')
      .then(res => {
        return this.cart = res;
      });;
  }

Console.log shows undefined

Method 2:-

cart = [];

getData() {
    return this.storage.get('products')
      .then(res => {
        return this.cart.push(res);
      });;
  }

Output :

How can i achieve this?

Cart variable as directly the array list from 0, 1,?

Posts: 1

Participants: 1

Read full topic

Ionic 4 Ion-select-option not showing multiple selection

$
0
0

@manojpatel0217 wrote:

ion-select-option is not showing prefilled multiple selected values.

I am trying to set some multiple values for ion-select but it’s not showing by default
if i hit ion-select it shows that values checked and also able to see its description text on lable
but before that it’s not come up.

Anyone has idea why this is happening?

Thanks

Posts: 1

Participants: 1

Read full topic

How to change the value of a position of an array from a doc on Ionic 4?

$
0
0

@Manel00 wrote:

Hi everyone, i’m trying to change the value of this:

ideasmodel

but just know how to add values, now i need to once click on the item-list.page on a position of the value i want to change (i need also pass on params the index) it goes to the item-detail.page and need to load it but don’t know how to obtain this value.

            this.afs.doc(`users/${this.user.getUID()}`).update({
                ideas: firestore.FieldValue.arrayUnion(this.idea)
            })

Thanks you so much anyway

Posts: 1

Participants: 1

Read full topic

ThemeableBrowser OverrideUserAgent/AppendUserAgent Not working

$
0
0

@anotherapj wrote:

The ThemeableBrowser plugin is not having the support for OverrideUserAgent / AppendUserAgent which is available in the InAppBrowser plugin. Due to this, I’m unable to vary the user agent string when the pages are opened in Themeable Browser. Please provide support for that. Refer the open pull requests https://github.com/initialxy/cordova-plugin-themeablebrowser/pull/72 for IOS & https://github.com/initialxy/cordova-plugin-themeablebrowser/pull/71 for Android.

Posts: 1

Participants: 1

Read full topic

@ionic/react IonPage is set to overflow: hidden

$
0
0

@ollie-w wrote:

I am using ‘@ionic/react’.

I have been looking at the conference demo app for guidance as the documentation is still not very thorough. Available here: https://github.com/ionic-team/ionic-react-conference-app/blob/master/src/App.tsx

I have written this code https://github.com/o-t-w/ionic-component-lib/blob/master/src/App.tsx

I am putting my main content in IonPage but then realised in the devtools that IonPage is set to overflow:hidden, so content is cut off.

Where am I meant to put my main content if not inside the IonPage component?

Posts: 1

Participants: 1

Read full topic


Tesseract OCR

$
0
0

@donnasarahmccabe wrote:

I have an issue, I’m using ionic 4 and the recognize method on my Tesseract OCR is throwing an error to do with the .let .complete on the ngorocessor … my code is as follow and appreciate any help

import { Component } from ‘@angular/core’;
import { NavController, ActionSheetController, LoadingController } from ‘@ionic/angular’;
import { Camera, PictureSourceType } from ‘@ionic-native/camera/ngx’;
import * as Tesseract from ‘tesseract.js’
import { NgProgress } from ‘@ngx-progressbar/core’;

@Component({
selector: ‘app-home’,
templateUrl: ‘home.page.html’,
styleUrls: [‘home.page.scss’],
})
export class HomePage {

selectedImage: string;
imageText: string;

constructor(public navCtrl: NavController, private camera: Camera, private actionSheetCtrl: ActionSheetController, public progress: NgProgress) {
}

async selectSource() {
  let actionSheet = await this.actionSheetCtrl.create({
    buttons: [
      {
        text: 'Use Library',
        handler: () => {
          this.getPicture(this.camera.PictureSourceType.PHOTOLIBRARY);
        }
      }, {
        text: 'Capture Image',
        handler: () => {
          this.getPicture(this.camera.PictureSourceType.CAMERA);
        }
      }, {
        text: 'Cancel',
        role: 'cancel'
      }
    ]
  });
  await actionSheet.present();
}

getPicture(sourceType: PictureSourceType) {
  this.camera.getPicture({
    quality: 100,
    destinationType: this.camera.DestinationType.DATA_URL,
    sourceType: sourceType,
    allowEdit: true,
    saveToPhotoAlbum: false,
    correctOrientation: true
  }).then((imageData) => {
    this.selectedImage = `data:image/jpeg;base64,${imageData}`;
  });
}

recognizeImage() {
  /*Tesseract.recognize(this.selectedImage)
  .progress(message => {
    console.log(message);
    if (message.status === 'recognizing text')
    this.progress.Set(message.progress);
  })
  .catch(err => console.error(err))
  .then(result => {
    this.imageText = result.text;
  })
  .finally(resultOrError => {
    alert(resultOrError);
    this.progress.Complete();
  });*/
}

}

Posts: 1

Participants: 1

Read full topic

Ionic error in app.module.ts

$
0
0

@Fares95 wrote:

Hello , i had a problem with app.module.ts when i tried page navigation
please help me to make it work!

type or paste code he
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { RouteReuseStrategy } from '@angular/router';

import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
import { StatusBar } from '@ionic-native/status-bar/ngx';

import { AppComponent } from './app.component';
import { AppRoutingModule } from './app-routing.module';
import { HomePage } from './home/home.page';
import { InscriptionPage } from './inscription/inscription.page';
import { ConnectionPage } from './connection/connection.page';
import { AdminInscrirePage } from './admin-inscrire/admin-inscrire.page';

@NgModule({
  declarations: [
    AppComponent,
    HomePage,
    InscriptionPage,
    ConnectionPage,
    AdminInscrirePage
  ],
  imports: [
    BrowserModule,
    IonicModule.forRoot(),
    AppComponent,
    HomePage,
    InscriptionPage,
    ConnectionPage,
    AdminInscrirePage

  ],

  entryComponents: [
    AppComponent,
    HomePage,
    ConnectionPage,
    AdminInscrirePage

  ],
  providers: [
    StatusBar,
    SplashScreen,
  { provide: RouteReuseStrategy, useClass: IonicRouteStrategy }
  ]
})
export class AppModule {}
re

here the screen capture of errors

i am really comfused about what should i correct
help me please
the pages files link in GitHub : https://github.com/faresbenslama95/IOnic.git

Posts: 1

Participants: 1

Read full topic

Show image loader in ionic | html

Override variables.scss do not work Android 5

$
0
0

@tokuhara wrote:

I have changed the color variables on variable.scss, it works on browser and Android 8, but not on Android 5 and 6.
I have set the primary color to purple but on Android 5 it shows blue.
Anyone have faced something like this?
Ps - I have uncommented the polyfills.ts.

Posts: 1

Participants: 1

Read full topic

Ionic4 - Setting background-image not showing

$
0
0

@gabbyCharles wrote:

Hello there,

I am trying to change the background image of ion-content page but cannot.

I am using ionic4 version4.10.3

i have tried in the page scss:

ion-content {
    --background: url('/assets/img/background.jpg') no-repeat center center fixed;
}

and

ion-content {
	background-image: url('/assets/img/image.png') !important;
}

both have not worked.
The page still loads with a white background

Any help will appreciated!.

Posts: 1

Participants: 1

Read full topic

Ionic 4 - ion-card remove padding

How to send data to LAN while using mobile data but connected to WiFi (No Internet)

$
0
0

@sereyvuthy wrote:

How to send data to LAN while using mobile data but connected to WiFi (No Internet).
I am using chrome.sockets.tcp plugin.

Posts: 1

Participants: 1

Read full topic


How to call reboot event in Ionic

$
0
0

@Husainsr wrote:

I am working on local-notification but after device restart it all notification which are scheduled are not come, so i am decided to store all in database and after device restart based on timing i will scheduled.

so is there any way to call function in my application after device restart.

Posts: 1

Participants: 1

Read full topic

Customer toggle button with text inside

Multi language in config.xml

$
0
0

@Vicnoob wrote:

Hi there,
I’m working on a multi language issue, I can use I18N easily to translate the string inside the app, but for String that use for cordova plugin, is there anyway to switch language base on users’ phone language?

<edit-config file="*-Info.plist" mode="merge" target="NSCameraUsageDescription">
      <string>Take camera</string>
</edit-config>

Posts: 1

Participants: 1

Read full topic

Production APK error

$
0
0

@demokumar wrote:

production APK gives error Uncaught Error: Cannot find module “.”
after app launch and display only splash screen for ionic 3

Posts: 2

Participants: 2

Read full topic

Ionic4 fingerprint sensor issue

$
0
0

@rajesh5129 wrote:

I have added fingerprint plugin given in official doc, but it is not working in my android mobile (i tested 3 to 4 mobile). getting the following issue.can anyone help me to solve the issue.

ERROR Error: "Uncaught (in promise): TypeError: Object(…) is not a function.

Posts: 1

Participants: 1

Read full topic

Viewing all 71531 articles
Browse latest View live