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

Ionic get array from json - web service

$
0
0

@slhndr wrote:

i’m using

 import { HTTP } from '@ionic-native/http/ngx';

for http requests from ionic app. But it doesn’t working for me.

This codes from ionic framework documentation:

import { HTTP } from '@ionic-native/http/ngx';

constructor(private http: HTTP) {}

this.http.get(myJsonApiUrl, {}, {})
  .then(data => {

    console.log(data.status);
    console.log(data.data); // data received by server
    console.log(data.headers);

  })
  .catch(error => {

    console.log(error.status);
    console.log(error.error); // error message as string
    console.log(error.headers);

  });

This code not displaying error detail. Only display : “undefined” for error.error

sorry for my english.

Posts: 1

Participants: 1

Read full topic


Slides in modal [v5]

$
0
0

@mieszkoPl wrote:

Hi, I’m trying to add a silder inside component witch is modal. Only then does not working and does not have the option to move, autoplay, etc.
When it is embedded, e.g. on the tab, it works in a manner consistent with the documentation.

Code from doc.:

Posts: 1

Participants: 1

Read full topic

Removed the ability to select a "Channel" when creating a "Web deploy" build

$
0
0

@trfletch wrote:

It seems over the past 24 hours Ionic Appflow have removed the option to select a “Channel” when you are creating a “Web deploy” build.

Now instead of being able to get a build deployed to a channel with a single step, you have to create a build, wait for the build to complete (which usually takes a few minutes), then select “Deploy live updates”, then choose the channel and deploy it. It doesn’t sound like much but when you are testing and deploying multiple web builds throughout the day to test on live devices it is fairly annoying.

Why has this been changed, it is never good user experience when you turn something that takes one or two clicks into something that takes multiple clicks with a “sit and wait” in between (whilst the build happens).

Is this a temporary bug or has Ionic made the decision to make this change for any logical reason?

Posts: 1

Participants: 1

Read full topic

modalController.create() throws No component factory found for [object Object]

$
0
0

@Chuuone wrote:

Hey, in a nutshell i am trying to run this on click:

public async showModal(paycheck): Promise<void> {
        const modal = await this.modalCtrl.create({
            component: ModalPaycheckComponent
        });
        await modal.present();
    }

However i get this error:

ERROR Error: "Uncaught (in promise): Error: No component factory found for [object Object]. Did you add it to @NgModule.entryComponents?
noComponentFactoryError@http://localhost:8100/build/vendor.js:4610:39
CodegenComponentFactoryResolver.prototype.resolveComponentFactory@http://localhost:8100/build/vendor.js:4674:19
ModalCmp.prototype.ionViewPreLoad@http://localhost:8100/build/vendor.js:63123:36
ViewController.prototype._lifecycle@http://localhost:8100/build/vendor.js:22622:33
ViewController.prototype._preLoad@http://localhost:8100/build/vendor.js:22484:14
NavControllerBase.prototype._preLoad@http://localhost:8100/build/vendor.js:53888:14
NavControllerBase.prototype._viewInit@http://localhost:8100/build/vendor.js:53578:14
NavControllerBase.prototype._nextTrns/<@http://localhost:8100/build/vendor.js:53389:23
F</l</t.prototype.invoke@http://localhost:8100/build/polyfills.js:3:14976
onInvoke@http://localhost:8100/build/vendor.js:5434:33
F</l</t.prototype.invoke@http://localhost:8100/build/polyfills.js:3:14916
F</c</r.prototype.run@http://localhost:8100/build/polyfills.js:3:10143
f/<@http://localhost:8100/build/polyfills.js:3:20242
F</l</t.prototype.invokeTask@http://localhost:8100/build/polyfills.js:3:15660
onInvokeTask@http://localhost:8100/build/vendor.js:5425:33
F</l</t.prototype.invokeTask@http://localhost:8100/build/polyfills.js:3:15581
F</c</r.prototype.runTask@http://localhost:8100/build/polyfills.js:3:10834
o@http://localhost:8100/build/polyfills.js:3:7894
F</h</e.invokeTask@http://localhost:8100/build/polyfills.js:3:16823
p@http://localhost:8100/build/polyfills.js:2:27648
v@http://localhost:8100/build/polyfills.js:2:27894

So i have read a lot of forum topics regarding this specific error. However none has solved the issue for me and i am way too new to module concept to solve this myself in fairly quick amount of time.

Here is the involved page and component i have defined the entryComponent in both places, not really sure why as i dont think it should be needed. Can anybody spot something wrong with this?

modal-paycheck.ts

import { Component, OnInit, Input } from '@angular/core';
import { ModalController } from 'ionic-angular';

@Component({
    selector: "modal-paycheck",
    templateUrl: 'modal-paycheck.html'
})

export class ModalPaycheckComponent implements OnInit {
    public text;

    constructor(public modalCtrl: ModalController) {
        console.log('Hello ModalPaycheckComponent Component');
        this.text = 'Hello World';
    }

    ngOnInit() {}
}

modal-paycheck.module.ts

import { ModalPaycheckComponent } from "./modal-paycheck";
import { NgModule } from "@angular/core";
import { IonicModule } from "ionic-angular";
import { CommonModule } from "@angular/common";

@NgModule({
    declarations: [ModalPaycheckComponent],
    imports: [IonicModule, CommonModule],
    entryComponents: [ModalPaycheckComponent]
})

export class ModalPaycheckComponentModule { }

paycheck.ts

import { Component, Injectable } from '@angular/core';
import { IonicPage, NavController, NavParams, ModalController } from 'ionic-angular';
import { FileTransfer, FileTransferObject } from '@ionic-native/file-transfer';
import { File } from '@ionic-native/file';
import { FileOpener } from '@ionic-native/file-opener';
import { Printer } from '@ionic-native/printer';
import { UserProvider } from '../../providers/user/user';
import moment from 'moment';
import { ModalPaycheckComponent } from '../../components/modal-paycheck/modal-paycheck';

@IonicPage()

@Component({
    selector: 'page-paycheck',
    templateUrl: 'paycheck.html',
})

@Injectable()

export class PaycheckPage {
    years: any;
    moment: any = moment;
    userData: any;
    selectedYear: any;
    paychecks: any = [];

    constructor(public navCtrl: NavController, public modalCtrl: ModalController, public navParams: NavParams, private transfer: FileTransfer, private file: File, private fileOpener: FileOpener, private printer: Printer, public userService: UserProvider) {
    }

    public async showModal(paycheck): Promise<void> {
        const modal = await this.modalCtrl.create({
            component: ModalPaycheckComponent
        });

        await modal.present();
    }
}

paycheck.module.ts

import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { PaycheckPage } from './paycheck';
import { FileTransfer } from '@ionic-native/file-transfer';
import { File } from '@ionic-native/file';
import { FileOpener } from '@ionic-native/file-opener';
import { Printer } from '@ionic-native/printer';
import { ModalPaycheckComponent } from '../../components/modal-paycheck/modal-paycheck';
import { ModalPaycheckComponentModule } from '../../components/modal-paycheck/modal-paycheck.module';

@NgModule({
    declarations: [
        PaycheckPage
    ],
    imports: [
        ModalPaycheckComponentModule,
        IonicPageModule.forChild(PaycheckPage),
    ],
    providers: [
        FileTransfer,
        File,
        FileOpener,
        Printer
    ],
    entryComponents: [
        ModalPaycheckComponent
    ]
})

export class PaycheckPageModule { }

ionic info

C:\wamp64\www\timetjek\User_app>ionic info

Ionic:

   Ionic CLI          : 5.4.14 (C:\Users\agaci\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.4

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : none
   Cordova Plugins   : no whitelisted plugins (1 plugins total)

Utility:

   cordova-res : 0.8.1
   native-run  : 0.3.0

System:

   Android SDK Tools : 26.1.1 (C:\Users\agaci\AppData\Local\Android\Sdk)
   NodeJS            : v12.14.0 (C:\Program Files\nodejs\node.exe)
   npm               : 6.13.4
   OS                : Windows 10

Posts: 1

Participants: 1

Read full topic

Reload page in ionic and stay on same page without move any where

$
0
0

@AvkAvk wrote:

Actully my situation is . in page we get list data from api which having delete button .

deleted when move to any onther page than it refresh it delete data dis apper from list in ionic 4 any solution pls suggest

Posts: 1

Participants: 1

Read full topic

Can I know the PNG file which SplashScreen use in runtime?

$
0
0

@jmoratat wrote:

I want to show a page with the same image as the SplashScreen shows, for show an input text and a button.

I need that the new page has the same backgroud as SplashScreen, so i need to know in Runtime, which file of /resources that is use by SplashScreen to configure it in --background: url(’…’).

¿It is possible? If it’s not possible, is there an algorithm to caclulate the exact filename?

Thank you!

Posts: 1

Participants: 1

Read full topic

Capacitor plugin with 3rd party iOS framework

$
0
0

@afg419 wrote:

I’m attempting to build a capacitor plugin which requires a 3rd party framework for iOS. So my setup looks like this:

my-ionic-app-for-testing <-- my-capacitor-plugin <-- 3rd-party-framework

Presently, I can get my-capacitor-plugin to compile with the 3rd-party-framework, but when I include my-capacitor-plugin into my-ionic-app-for-testing, I get compile errors “3rd-party-framework” not found.

Additional Details: I’m guessing I made a mistake in how I attempted to create this dependency chain.

my-capacitor-plugin <-- 3rd-party-framework

The 3rd-party-framework recommends installing it using the Carthage build tool. I create my-capacitor-plugin/Cartfile, include the dependency I need, and run $ carthage update . This creates the my-capacitor-plugin/Carthage/Build/iOS/3rd-party.framework directory. In the Xcode ‘general’ tab, I drop this folder into ‘Frameworks and Libraries’ for Pods with targets “Capacitor” and “Pods-Plugin”, and for Plugin with target “Plugin”. At this point I import the 3rd-party-framework into Plugin.swift (import ThirdParty), the project then builds in Xcode. (It is perhaps worth noting that the 3rd-party-framework itself is written in ObjectiveC, though xcode seems to know how to translate this into a swift import on its own.)

my-ionic-app-for-testing <-- my-capacitor-plugin

In my-ionic-app-for-testing/package.json I have…

“dependencies”: {

“my-capacitor-plugin”: “file:…/my-capacitor-plugin”,

},

where the filepath points to the root of the my-capacitor-plugin project. I build the project with:

npm i ionic build
$ npx cap sync

I try building with xcode, pointing to my-ionic-app-for-testing/ios/App/App.xcworkspace, where I get the above “3rd-party-framework” not found errors.

In looking around, this post https://stackoverflow.com/questions/58045726/how-to-embed-third-party-framework-on-ionic-capacitor-custom-plugin suggests I need to additionally edit my-capacitor-plugin/MyCapacitorPlugin.podspec. Other posts have suggested I need to add additional run scripts or copy file scripts within the my-capacitor-plugin xcode project. I haven’t gotten any permutation of these ideas to work.

Any help would be greatly appreciated

Posts: 1

Participants: 1

Read full topic

Not able to do production release build. Struggling a lot on this

$
0
0

@santhoshprasana wrote:

Here is the error i am getting while executing the below command.

ionic cordova build android --prod --release

Please help me on this.

Error Log:
E:\Projects\try\myApp\platforms\android\app\src\main\res\drawable-land-hdpi\screen.png: Error: The drawable “screen” in drawable-land-hdpi has no declaration in the base drawable folder or in a drawable-densitydpi folder; this can lead to crashes when the drawable is queried in a configuration that does not match this qualifier [MissingDefaultResource]
E:\Projects\try\myApp\platforms\android\app\src\main\res\drawable-land-ldpi\screen.png: Error: The drawable “screen” in drawable-land-ldpi has no declaration in the base drawable folder or in a drawable-densitydpi folder; this can lead to crashes when the drawable is queried in a configuration that does not match this qualifier [MissingDefaultResource]> Task :app:lintVitalRelease

E:\Projects\try\myApp\platforms\android\app\src\main\res\drawable-land-mdpi\screen.png: Error: The drawable “screen” in drawable-land-mdpi has no declaration in the base drawable folder or in a drawable-densitydpi folder; this can lead to crashes when the drawable is queried in a configuration that does not match this qualifier [MissingDefaultResource]
E:\Projects\try\myApp\platforms\android\app\src\main\res\drawable-land-xhdpi\screen.png: Error: The drawable “screen” in drawable-land-xhdpi has no declaration in the base drawable folder or in a drawable-densitydpi folder; this can lead to crashes when the drawable is queried in a configuration that does not match this qualifier [MissingDefaultResource]
E:\Projects\try\myApp\platforms\android\app\src\main\res\drawable-land-xxhdpi\screen.png: Error: The drawable “screen” in drawable-land-xxhdpi has no declaration in the base drawable folder or in a drawable-densitydpi folder; this can lead to crashes when the drawable is queried in a configuration that does not match this qualifier [MissingDefaultResource]
E:\Projects\try\myApp\platforms\android\app\src\main\res\drawable-land-xxxhdpi\screen.png: Error: The drawable “screen” in drawable-land-xxxhdpi has no declaration in the base drawable folder or in a drawable-densitydpi folder; this can lead to crashes when the drawable is queried in a configuration that does not match this qualifier [MissingDefaultResource]
E:\Projects\try\myApp\platforms\android\app\src\main\res\drawable-port-hdpi\screen.png: Error: The drawable “screen” in drawable-port-hdpi has no declaration in the base drawable folder or in a drawable-densitydpi folder; this can lead to crashes when the drawable is queried in a configuration that does not match this qualifier [MissingDefaultResource]
E:\Projects\try\myApp\platforms\android\app\src\main\res\drawable-port-ldpi\screen.png: Error: The drawable “screen” in drawable-port-ldpi has no declaration in the base drawable folder or in a drawable-densitydpi folder; this can lead to crashes when the drawable is queried in a configuration that does not match this qualifier [MissingDefaultResource]
E:\Projects\try\myApp\platforms\android\app\src\main\res\drawable-port-mdpi\screen.png: Error: The drawable “screen” in drawable-port-mdpi has no declaration in the base drawable folder or in a drawable-densitydpi folder; this can lead to crashes when the drawable is queried in a configuration that does not match this qualifier [MissingDefaultResource]
E:\Projects\try\myApp\platforms\android\app\src\main\res\drawable-port-xhdpi\screen.png: Error: The drawable “screen” in drawable-port-xhdpi has no declaration in the base drawable folder or in a drawable-densitydpi folder; this can lead to crashes when the drawable is queried in a configuration that does not match this qualifier [MissingDefaultResource]
E:\Projects\try\myApp\platforms\android\app\src\main\res\drawable-port-xxhdpi\screen.png: Error: The drawable “screen” in drawable-port-xxhdpi has no declaration in the base drawable folder or in a drawable-densitydpi folder; this can lead to crashes when the drawable is queried in a configuration that does not match this qualifier [MissingDefaultResource]
E:\Projects\try\myApp\platforms\android\app\src\main\res\drawable-port-xxxhdpi\screen.png: Error: The drawable “screen” in drawable-port-xxxhdpi has no declaration in the base drawable folder or in a drawable-densitydpi folder; this can lead to crashes when the drawable is queried in a configuration that does not match this qualifier [MissingDefaultResource]

Explanation for issues of type “MissingDefaultResource”:
If a resource is only defined in folders with qualifiers like -land or -en,
and there is no default declaration in the base folder (layout or values
etc), then the app will crash if that resource is accessed on a device
where the device is in a configuration missing the given qualifier.

As a special case, drawables do not have to be specified in the base
folder; if there is a match in a density folder (such as drawable-mdpi)
that image will be used and scaled. Note however that if you only specify
a drawable in a folder like drawable-en-hdpi, the app will crash in
non-English locales.

There may be scenarios where you have a resource, such as a -fr drawable,
which is only referenced from some other resource with the same qualifiers
(such as a -fr style), which itself has safe fallbacks. However, this still
makes it possible for somebody to accidentally reference the drawable and
crash, so it is safer to create a default dummy fallback in the base
folder. Alternatively, you can suppress the issue by adding
tools:ignore=“MissingDefaultResource” on the element.

(This scenario frequently happens with string translations, where you might
delete code and the corresponding resources, but forget to delete a
translation. There is a dedicated issue id for that scenario, with the id
ExtraTranslation.)

12 errors, 0 warnings

Posts: 1

Participants: 1

Read full topic


Ionic v5: Link from iFrame does not load on iOS

$
0
0

@H23 wrote:

I am using an Ionic v5 App on iOS: I use an iFrame from the external service of the “Deutsche Bahn”: https://www.bahn.de/p/view/home/partnerprogramm/anreiseservice.shtml

<iframe src="https://dbaw.specials-bahn.de/149cff8c-5fbd-11ea-8079-00163efd4d20.html" 
        width="100%" 
        height="346" 
        name="iFrame"> 
</iframe>

I specified

<allow-navigation href="*" />
<access origin="*" />

in config.xml, but it is still not possible to open the link of the external iFrame.

Whats the solution for this?

Posts: 1

Participants: 1

Read full topic

Alternatives from Ionic V3 to V4

$
0
0

@Fmhmd wrote:

Hello everyone,

I hope everyone is doing well.

I’m looking for some assistance upgrading from V3 to V4.

The issue we have is that in IonContent both getContentDimensions and resize methods have been removed in Ionic 4. Is there any other way to get the dimensions of and resize it?

Here is some sample code:

  @ViewChild(IonContent)
  content: IonContent
  const dimensions = this.content.getContentDimensions()
  this.pageHeight = dimensions.contentHeight
      // set height for some charts
	…..
	…..
  this.content.resize()

Thank you all for your assistance.

Posts: 1

Participants: 1

Read full topic

How to implement a QR Scanner in Ionic 4? Camera not showing

$
0
0

@feliperiverot wrote:

I am working with ionic 4 developing and app. I installed the cordova QR Scanner plugin, because I need the QR functionality

I followed the tutorial, but the camera is not showing. here is the ts script:

import { Component, OnInit } from '@angular/core';
import { ModalController } from '@ionic/angular';
import { QRScanner, QRScannerStatus } from '@ionic-native/qr-scanner/ngx';

@Component({
  selector: 'app-agregarpin',
  templateUrl: './agregarpin.page.html',
  styleUrls: ['./agregarpin.page.scss'],
})
export class AgregarpinPage implements OnInit {

  constructor(public modalController: ModalController,private qrScanner: QRScanner) { }

  ngOnInit() {
  }

    dismiss() {
    // using the injected ModalController this page
    // can "dismiss" itself and optionally pass back data

    this.modalController.dismiss();
  }

  scandata(){


      this.qrScanner.prepare()
  .then((status: QRScannerStatus) => {



     if (status.authorized) {
       // camera permission was granted

        this.qrScanner.show();
       // start scanning
       let scanSub = this.qrScanner.scan().subscribe((text: string) => {
         console.log('Scanned something', text);

         this.qrScanner.hide(); // hide camera preview
         scanSub.unsubscribe(); // stop scanning
       });

     } else if (status.denied) {

       // camera permission was permanently denied
       // you must use QRScanner.openSettings() method to guide the user to the settings page
       // then they can grant the permission from there
     } else {
       // permission was denied, but not permanently. You can ask for permission again at a later time.
     }
  })
  .catch((e: any) => console.log('Error is', e));



  }//

}

After some tested I didn’t found any error. After some researched I got this, the camera is working but under app. The layers and html tags are above the camera. Then I follow this tutorial, and the camera still is not showing.

The fix according to the tutorial and others forum is to add a css class to ion-app tag, like this:

CCS

ion-app.cameraView, ion-app.cameraView ion-content, ion-app.cameraView .nav-decor {
  background: transparent none !important; 
}

This css code, I added to global.scss and app.component.scss files.

And then is the updated function:

 scandata(){

        (window.document.querySelector('ion-app') as HTMLElement).classList.add('cameraView');
         (window.document.querySelector('body') as HTMLElement).classList.add('cameraView');
          (window.document.querySelector('ion-router-outlet') as HTMLElement).classList.add('cameraView');



      this.qrScanner.prepare()
  .then((status: QRScannerStatus) => {



     if (status.authorized) {
       // camera permission was granted

        this.qrScanner.show();
       // start scanning
       let scanSub = this.qrScanner.scan().subscribe((text: string) => {
         alert('Scanned something');

         this.qrScanner.hide(); // hide camera preview
         scanSub.unsubscribe(); // stop scanning
       });

     } else if (status.denied) {

       // camera permission was permanently denied
       // you must use QRScanner.openSettings() method to guide the user to the settings page
       // then they can grant the permission from there
     } else {
       // permission was denied, but not permanently. You can ask for permission again at a later time.
     }
  })
  .catch((e: any) => console.log('Error is', e));



  }//

But the camera still not showing here are some screenschots.

The page, is completely blank with only a button with the click function that calls the scandata() method enter image description here

When I clicked the “default” button A dialog box appears asking for permission to use the camera:

enter image description here

I click on the “allow” button, but still the camera, is not working.

enter image description here

I dont know what else I can do.

Posts: 2

Participants: 2

Read full topic

Why npm install doesnt install angular/dev-kit

$
0
0

@itosoft wrote:

hi while i am using npm to install dependencies at the end i got this error:

and also i can not serve ionic because of a despondency [![enter image description here]

here is the part of log

17252 verbose optional SKIPPING OPTIONAL DEPENDENCY:
17252 verbose optional The operation was rejected by your operating system.
17252 verbose optional SKIPPING OPTIONAL DEPENDENCY: It's possible that the file was already in use (by a text editor or antivirus),
17252 verbose optional SKIPPING OPTIONAL DEPENDENCY: or that you lack permissions to access it.
17252 verbose optional SKIPPING OPTIONAL DEPENDENCY:
17252 verbose optional SKIPPING OPTIONAL DEPENDENCY: If you believe this might be a permissions issue, please double-check the
17252 verbose optional SKIPPING OPTIONAL DEPENDENCY: permissions of the file and its containing directories, or try running
17252 verbose optional SKIPPING OPTIONAL DEPENDENCY: the command again as root/Administrator.
17253 verbose stack Error: ENOENT: no such file or directory, rename 'F:\ionic\itosoft\amnasnad-lts\node_modules\@angular-devkit\build-angular\node_modules\parse5' -> 'F:\ionic\itosoft\amnasnad-lts\node_modules\@angular-devkit\build-angular\node_modules\.parse5.DELETE'
17254 verbose cwd F:\ionic\itosoft\amnasnad-lts
17255 verbose Windows_NT 10.0.18362
17256 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
17257 verbose node v12.16.1
17258 verbose npm  v6.13.4
17259 error code ENOENT
17260 error syscall rename
17261 error path F:\ionic\itosoft\amnasnad-lts\node_modules\@angular-devkit\build-angular\node_modules\parse5
17262 error dest F:\ionic\itosoft\amnasnad-lts\node_modules\@angular-devkit\build-angular\node_modules\.parse5.DELETE
17263 error errno -4058
17264 error enoent ENOENT: no such file or directory, rename 'F:\ionic\itosoft\amnasnad-lts\node_modules\@angular-devkit\build-angular\node_modules\parse5' -> 'F:\ionic\itosoft\amnasnad-lts\node_modules\@angular-devkit\build-angular\node_modules\.parse5.DELETE'
17265 error enoent This is related to npm not being able to find a file.
17266 verbose exit [ -4058, true ]

full log at https://gofile.io/?c=dKTtf3

Posts: 1

Participants: 1

Read full topic

How to set value dynamically default value in ion-select-option

$
0
0

@UnnatiPatadia wrote:

I’m using Ionic 4.
I want to show a default value in ion-select-option.
Option’s values come from the server.
API works all values show but on click of ion-select.
But I want to show the default value.

Response

{"success":1,"service_details":[{"id":"1","name":"Job\/Service","status":"1"},{"id":"2","name":"Student","status":"1"},{"id":"3","name":"House Wife","status":"1"},{"id":"4","name":"Business","status":"1"}]}

register.ts

 userData = { "fname": "", "lname": "", "contact_no": "", "email_id": "", "password": "", 
 "business_type": "", "organization_name": "", "designation": "", };

constructor () { 
    this.userData.business_type = "1";
}

getAllService(){
    let loading = this.loadingCtrl.create({
      spinner: 'circles',
      message: 'Please wait...'
    }).then(loading => loading.present());

    this.authService.getData("get_all_service_type.php").then((result) => {
      this.items = result;
        this.success = this.items.success;
        console.log(this.success);

        if (this.success == 1) {
          this.loadingCtrl.dismiss();
          this.serviceData = this.items.service_details;
          console.log(this.serviceData);
        } else {
          this.message = this.items.message;
          this.loadingCtrl.dismiss();
        }

    }, (err) => {
       this.loadingCtrl.dismiss();
      console.log("Error", err);
    });
  } 

register.html

 <ion-item>
     <ion-label>Occupation </ion-label>
     <ion-select value="Job/Service" (ionChange)="optionsFn()" name="business_type" [(ngModel)]="userData.business_type">
         <div *ngFor="let item of serviceData">
             <ion-select-option value="{{item.id}}">{{item.name}}
             </ion-select-option>
         </div>
      </ion-select>
 </ion-item>

OR

<ion-select (ionChange)="optionsFn()" name="business_type" [(ngModel)]="userData.business_type">
  <ion-select-option *ngFor="let item of serviceData" value="{{item.id}}" [selected]="userData.business_type == item.name">{{item.name}}</ion-select-option>
</ion-select>

Posts: 1

Participants: 1

Read full topic

Ionic 4 app run after swipe out/killed

$
0
0

@prabhashi1 wrote:

I need to call a method in every second (my app include a count down) and it’s working when the app in the thread but once I swipe out the app the countdown stops. How can I manage to do this?

Posts: 1

Participants: 1

Read full topic

Stencil compiler programmatically

$
0
0

@nachtwandler wrote:

Hello,

does anybody know a way or some deocumentation how to use the stencil cli commands programmatically from a node process?

Best regards

Posts: 1

Participants: 1

Read full topic


Amount validation

$
0
0

@mehraj786 wrote:

hi i want to validate amount like this 23.56 in ionic 4 for input type number and i dont want dash(-) symbol to accept this input… please let me know how to achive this from past one month i am having this issue

Posts: 1

Participants: 1

Read full topic

@ionic/storage tables/multiple databases? unclear

$
0
0

@ctfrancia wrote:

I am using the @ionic/storage package in Ionic 5, in retrospect I wish I would have used the SQLite plugin, but, anyways… here we are.

So I don’t really know what is going on under-the-hood that well as the docs don’t really provide that information. Is there a way to create tables? So my application has many separated sections, for example I have peerMessages, groupMessages, contacts, notifications, etc. And, currently in each of their respective service I am creating a new database(I think? once again docs not too clear) by doing

private messageStorage: Storage;
private groupMessageStorage: Storage;
public contructor() {
  this.messageStorage = new Storage({
    name: 'messageStorage',
    storeName: '_messageStorage',
  });
  this.groupMessageStorage = new Storage({
    name: 'groupMessage',
    store: '_groupMessage',
  });
}

now from the localforge docs I am creating multiple instances. Which I am assuming that this is not the same as a table, but, instead a whole other database??

I guess what my question is, if this option that I have done above is ok and will it scale when I create more of these instances? because as it is now when the application is started and I am inspecting through google chrome I see 6 instances of waiting for the Storage being opened, which as I add more instances is only going to slow down the start of the application. What I would like to do is create one db and then just access the table messages or groupMessages and save data/etc.

Posts: 1

Participants: 1

Read full topic

Ionic 3 add accessibility aria-labelledby

$
0
0

@xzetic wrote:

Hi, I’m only new here. I just need some help on my company accessibility requirements.
I’m using ion-spinner component for our loading application. We want to add element such as
role=“img” aria-labelledby=“idloading” to its auto generated SVG.

For example:
svg role=“img” aria-labelledby=“idloading” viewBox=“0 0 64 64” style=“animation-duration: 750ms;”></svg

image

Anyone know how to access the svg to add this elements? Thanks in advance!

Posts: 1

Participants: 1

Read full topic

Ion content

$
0
0

@Mmadzharov wrote:

Hey I have a question is it ok to add elements between the ion-content and ion-footer:

Some static content
.

Posts: 1

Participants: 1

Read full topic

Where sqlite store database file on Android

$
0
0

@anton_klochko wrote:

Good day! I am use Cordova SQLite Plugin for offline database. it work normally but i have know where the db file is located and share file with other person. Could anyone help please to find it on android devices.

I use…

      const DB_NAME: string = '__ionicstorage';
     const win: any = window;

    this._db = win.sqlitePlugin.openDatabase({
      name: DB_NAME,
      location: 2,
      createFromLocation: 0
    });

Posts: 1

Participants: 1

Read full topic

Viewing all 70432 articles
Browse latest View live


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