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

Calling method inside itselft

$
0
0

@Vartex05 wrote:

Hi, iam using cordova nfc plugin in my app, to read nfc tag, then i check if it is correct on the server and i navigate to next page, or activate reader again.My code in service(userService) looks like this:

public startReading(){
        return new Promise((resolve,reject)=>{
            nfc.readerMode(nfc.FLAG_READER_NFC_A,(tag)=>{
                nfc.disableReaderMode();
                resolve(this.transformTag(tag.id));
            },err=>{
                console.log(err);
                nfc.disableReaderMode();
                reject(err);
            });
        });
    }

and in my page i use it like this:

ionViewWillEnter(){
    console.log("nfcAktivaceLogin");
    this.platform.ready().then(()=>{
      this.userService.startReading().then((tagId)=>{
        console.log("tagid",tagId);
        this.uisLogin(tagId);
      });
    })
  }

uisLogin(tagID){
    let loading=this.loadingCtrl.create({
      spinner:'crescent'
    });
    loading.present();
    this.productService.loginEmployee(tagID).subscribe((data)=>{
      console.log("Výsledek",data);
      loading.dismiss();
      this.navCtrl.push(HomePage);
    }, err=>{
      loading.dismiss();
      this.userService.startReading().then((tagId)=>{
        console.log("tagid",tagId);
        this.uisLogin(tagId);
      });
      let alert = this.alertCtrl.create({
        title: err.message,
        buttons: ['OK']
      });
      alert.present();
    });
  }

In uisLogin Method, iam calling itself inside it, is it a problem? I kinda think that it isnt the best solution, but it seems to be working. Any ideas?

Posts: 1

Participants: 1

Read full topic


How can I detect a watermark image

$
0
0

@flycoders_sourav wrote:

I have multiple images fee are watermarked and few are not watermark . how can I detect which one marked and which one not marked . please can you help me any one . any help or source would be highly appreciated

thanks in advance

Posts: 1

Participants: 1

Read full topic

Can't display image from gallery

$
0
0

@krupa_rk wrote:

I have an app that allows a user to select a photo from the gallery or take a photo via camera. I am trying to display an image that was taken via camera and it works fine, But when i loading image from gallery. it give unreadable path like

content://com.android.providers.media.documents/document/image%3A28854

my ionic info

ionic (Ionic CLI) : 4.6.0
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.2

Also another developer posted same question in ionic native

https://forum.ionicframework.com/t/display-image-from-gallery/154681

Please help to reslove this issue.

Thanks in advance

Posts: 4

Participants: 2

Read full topic

Can I import pages into ion-slides?

$
0
0

@dccil wrote:

Is it possible to import pages(from src/pages your generate) into Slides? I generated a few pages, and I edited the HTML and .ts files for something. I would like to import those pages into ion-slides since the HTML and .ts files of those pages are lengthy and doing all the slides in one page seems a little disorganized.

something like

<ion-slides>
      <ion-slide>
            {{import page 1 here}}?
       </ion-slide>

       <ion-slide>
             {{import page 2 here}}
        </ion-slide>
</ion-slides>

Posts: 1

Participants: 1

Read full topic

How to lazy load a large JS import?

$
0
0

@schngrg wrote:

One of our app uses some large libraries like three.js, moment etc and it all gets compiled as one large vendor.js which has all the node_modules packed together. And this massive .js is loaded at app launch (at least with v3, I wonder if this changed with v4).

Is there a way import these large libraries such that they are lazy loaded when needed - which in our case will be right after the first page is displayed and becomes interactive. A solution that works with either v3 or v4 will help.

Posts: 1

Participants: 1

Read full topic

Ionic 4.0.1 - Remove iOS scroll "bounce"

$
0
0

@mlynch wrote:

I’m writing an app for both iOS and Android.

On Android, when the user reaches the bottom of the page, the scrolling stops. On iOS, when the user reaches the bottom of the page it “bounces” past the end of the page and shows a white background. I don’t want it to do this - the background of my page is dark grey, and this overscroll looks terrible.

I’ve already added the following three lines to the config.xml file:

<preference name="webviewbounce" value="false" />
<preference name="UIWebViewBounce" value="false" />
<preference name="DisallowOverscroll" value="true" />

But they don’t have any effect.

What else can I do to prevent this over-scroll, “bounce” effect?

Posts: 1

Participants: 1

Read full topic

Set sass variable value in Ionic from web api for white label system

$
0
0

@kuntal wrote:

I am doing ionic-angular from last few weeks ,and now I have a requirement ,dynamically style public site .The site admin set various color codes and logo image from admin in database and these will reflect when the Public Site opens .

As I am from asp.net background ,previously what is do is,on master page load take values from DB and write into a .less file ,and less java-script library take care of it, its simple there.

But for current situation I am using sass and not able find a way how to write variables value into .scss file .

I just learn a new thing APP_INITIALIZER from here ,but ultimately this post not showing how to write in the .scss file.

I am actually thinking this with my asp.net knowledge,but may be I am wrong ,or there are another way of implementation.

I want a simple solution ,what we do in asp.net I want to achieve this in same way.

Take variable value from DB via api,when application loading for first time.

Write values in SASS variable file .

After that SASS will take care of this and we get result as expected .

Please give some suggestion or example ,to start with .

Thanks.

Posts: 1

Participants: 1

Read full topic

How to put dropdown menu in ionic header


Install ipa on device

$
0
0

@jfsoftwarellc wrote:

So, so close to being able to test my app on an Apple device.

I’ve signed up for Apple Developer to get the certificate and provisioning.
I’ve signed up for AppFlow to load all that stuff in and generate the build
I have downloaded the .ipa file to my Windows 10 laptop.

Now, how do I install and run it on my iPhone 6? From the command line I’ve tried “ionic cordova run ios” but it says “Error: xcodebuild was not found. Please install version 7.0.0 or greater from App Store”. How to I make it install the existing .ipa file that’s in the project folder instead of trying to build it fresh?

Posts: 1

Participants: 1

Read full topic

Ionic 4 Double Side Menu

$
0
0

@maxlev wrote:

How do i open secondary side menu from button click?
When i pass menuId to menuController open method, i always get to open first/primary side menu.

Posts: 1

Participants: 1

Read full topic

Downloading file

$
0
0

@quant wrote:

I can’t find any documentation on this anywhere, but I am trying to download a file in parts. Does anyone know of a way to download a file in parts and combined them later in ionic?

Posts: 1

Participants: 1

Read full topic

Threejs for Ionic4 possible?

$
0
0

@fkkcloud wrote:

Hi there,

Is using ThreeJS in Ionic4 possible?
I see that Ionic4 now only supports TypeScript and ThreeJS is javascript based library.

Do you think I can import ThreeJS and use it in a .js file to implement a ThreeJS scene and render within Ionic4??

Does anybody has tried it before?

Posts: 1

Participants: 1

Read full topic

What do you do? Ionic storage vs Firebase

$
0
0

@aslan123 wrote:

Hi,

What do you do?

When making a mobile app (Ionic 3 or 4), when should one use Ionic/native storage, and when should one use Firebase? Or do people just use Firebase (real time database, or Firestore, or cloud hosting) for all the storage and ignore local and Ionic storage?

Thanks

Posts: 1

Participants: 1

Read full topic

Tab page loaded twice only on Devices

$
0
0

@jgaleanog wrote:

Hello everyone.

I’m new in this forum. I have a problem with Ionic 4, I have a Page that it has tabs inside. When I go into some tab page for the first time, the ionViewWillEnter and ionViewDidLoad methods are called twice but the ionViewCanEnter method only once. This behavior is only on devices because when I run on the browser everything is ok.

Thanks for your help.

My ionic info:

Ionic:

ionic (Ionic CLI) : 4.3.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.7.1 @ionic/app-scripts : 3.0.0
Cordova:

cordova (Cordova CLI) : 8.0.0
Cordova Platforms : android 7.1.0, ios 4.5.5
Cordova Plugins : no whitelisted plugins (18 plugins total)

System:

ios-deploy : 1.9.2
NodeJS : v6.11.2 (/usr/local/bin/node)
npm : 3.10.10
OS : macOS
Xcode : Xcode 10.1 Build version 10B61

Posts: 1

Participants: 1

Read full topic

Ionic 4 ion-select dynamically generated two dropdown based on first dropdown selection, How do I clear the second dropdown?

$
0
0

@Software3809 wrote:

Good day, I’m new in Ionic, I have a form in my ionic project that has 2 dropdown menus of selection ion-select. When the user selects an option in the first dropdown menu, it generates the options in the second dropdown list. This works well. when I add new fields, I can reestablish the values of the first list displayed with [(ngModel)] = null in .ts, but I have not been able to reestablish those in the 2 drop-down list.

thank you

 <div formArrayName="sucursales" margin-bottom>

     <!--generate new registration fields-->
     <section [formGroupName]="i" *ngFor="let tech of   form.controls.sucursales.controls; let i = index">

                <ion-item>
                    <ion-icon name="list" item-start></ion-icon>
                    <ion-label>Departamento</ion-label>
                    <ion-select [(ngModel)]="locate" name="country" #country formControlName="country" (ionChange)="CountryChange($event)">
                        <ion-option *ngFor="let department of ubicacion; let i = index" value="{{department.departamento}}">{{department.departamento}}</ion-option>
                    </ion-select>
                </ion-item>

                <ion-item *ngFor="let x of selectedMunicipality">
                    <ion-icon name="list" item-start></ion-icon>
                    <ion-label>Municipio</ion-label>
                    <ion-select [(ngModel)]="locates" name="state" #state formControlName="state">
                        <ion-option *ngFor="let municipio of x.ciudades" value="{{municipio}}">{{municipio}}</ion-option>
                    </ion-select>
                </ion-item>





       //code .ts

       this.http.get('http://localhost/ionic-php-mysql/colombia.json').map(res => res.json()).subscribe(
    data => {

        let headers = new Headers();
        headers.append('Content-Type', 'application/json');

        this.ubicacion = data.colombia;
    },
    error => {
        console.log("Oops!", error);
    }

);

   CountryChange(value: string) {

          this.locate = null;  //It works well
          this.locates = null; //it does not work

          this.selectedMunicipality = this.ubicacion.filter(item =>      item.departamento === value)
 }


.

Posts: 1

Participants: 1

Read full topic


How to build an app with iOS 12.1 SDK or later?

$
0
0

@skydive wrote:

Last time I submitted my app to iTunes Connect I’ve got this email from Apple:

SDK Version Issue - This app was built with the iOS 11.2 SDK. Starting March 2019, all iOS apps submitted to the App Store must be built with the iOS 12.1 SDK or later, included in Xcode 10.1 or later.

On the other side, Ionic documentation clearly states::

We recommend using XCode 9. Xcode 10 support in Cordova is still a work-in-progress. See this issue for details.

Any recommendations how to solve this and build Ionic app with iOS 12.1?

And more general question: how do you know what iOS SDK you’re currently using and how to change it? I did some research to find answers to these questions, but didn’t find any.

Appreciate your help.

Posts: 1

Participants: 1

Read full topic

Looking for some local NZ based ios app build/deploy assistance

$
0
0

@Silverbugnz wrote:

Hey All,

We’re working on an ionic application and having no end of trouble getting it compiled and working on ios devices.

Ideally I’d like to sit with someone locally (We’re based in Auckland NZ) who can walk through what we’ve done and give us a hand getting it straightened out and working. Could be open to remote video chat for the right person. At this point we’re struggling a bit with xCode and getting the application to run once built.

Happy to pay for your time.

Posts: 1

Participants: 1

Read full topic

[Errorr] [cordova plugin market] why Can't resolve all parameters for my app [?]

$
0
0

@anitatmj wrote:

hi all why i got this errorr
Error: Can’t resolve all parameters for MyApp: ([object Object], [object Object], [object Object], [object Object], [object Object], ?).

i use ionic v 3 [3.9.2]
cordova plugin market is spec=“1.2.0”.

this my config.xml

<?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.biografisultaniskandarmuda1" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>Biografi Sultan Iskandar Muda</name>
    <description>An awesome Ionic/Cordova app.</description>
    <author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
    <content src="index.html" />
    <access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <preference name="ScrollEnabled" value="false" />
    <preference name="android-minSdkVersion" value="16" />
    <preference name="BackupWebStorage" value="none" />
    <preference name="SplashMaintainAspectRatio" value="true" />
    <preference name="FadeSplashScreenDuration" value="300" />
    <preference name="SplashShowOnlyFirstTime" value="false" />
    <preference name="SplashScreen" value="screen" />
    <preference name="SplashScreenDelay" value="3000" />
    <preference name="StatusBarBackgroundColor" value="#333333" />
    <platform name="android">
        <allow-intent href="market:*" />
        <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
        <icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
        <icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
        <icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
        <icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
        <icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
        <splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
        <splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
        <splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
        <splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
        <splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
        <splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
        <splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
        <splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
        <splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
        <splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
        <splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" />
        <splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
        <icon height="57" src="resources/ios/icon/icon.png" width="57" />
        <icon height="114" src="resources/ios/icon/icon@2x.png" width="114" />
        <icon height="40" src="resources/ios/icon/icon-40.png" width="40" />
        <icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" />
        <icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" />
        <icon height="50" src="resources/ios/icon/icon-50.png" width="50" />
        <icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" />
        <icon height="60" src="resources/ios/icon/icon-60.png" width="60" />
        <icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" />
        <icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" />
        <icon height="72" src="resources/ios/icon/icon-72.png" width="72" />
        <icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" />
        <icon height="76" src="resources/ios/icon/icon-76.png" width="76" />
        <icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" />
        <icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" />
        <icon height="29" src="resources/ios/icon/icon-small.png" width="29" />
        <icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" />
        <icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" />
        <icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" />
        <splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" />
        <splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" />
        <splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" />
        <splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" />
        <splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" />
        <splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" />
        <splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" />
        <splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" />
        <splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" />
        <splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" />
        <splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" />
        <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" />
        <splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" />
    </platform>
    <plugin name="cordova-plugin-whitelist" spec="1.3.3" />
    <plugin name="cordova-plugin-statusbar" spec="2.4.2" />
    <plugin name="cordova-plugin-device" spec="2.0.2" />
    <plugin name="cordova-plugin-splashscreen" spec="5.0.2" />
    <plugin name="cordova-plugin-ionic-webview" spec="^2.0.0" />
    <plugin name="cordova-plugin-ionic-keyboard" spec="^2.0.5" />
    <plugin name="cordova-plugin-x-socialsharing" spec="5.4.4" />
    <plugin name="cordova-plugin-apprate" spec="1.4.0" />
    <plugin name="cordova-plugin-admob-free" spec="0.25.0">
        <variable name="ADMOB_APP_ID" value="ca-app-pub-1312092729851913~6922673794" />
    </plugin>
    <engine name="android" spec="7.1.4" />
    <plugin name="cordova-plugin-market" spec="1.2.0" />
</widget>

i was import it to app.modules…ts & app.component.ts
please help me

Posts: 1

Participants: 1

Read full topic

Button enabled looks disabled until mouseover event

$
0
0

@kirliam wrote:

I have a ion-button in my header like below:

<ion-header>
    <ion-toolbar color="primary">
        <ion-buttons slot="start">
            <ion-back-button defaultHref="dashboard"></ion-back-button>
        </ion-buttons>
        <ion-title>Configurações</ion-title>
        <ion-buttons slot="end">
            <ion-button [disabled]="disableButton()" (click)="save()" title="Salvar Alterações">
                <ion-icon slot="icon-only" name="wine"></ion-icon>
            </ion-button>
            <user-button></user-button>
        </ion-buttons>
    </ion-toolbar>    
</ion-header>

when the button becomes enabled (disableButton() returns false due some change in the page), the DOM is modified correctly by angular, but the button appearance is still disabled. And if I move the mouse over the button then it becomes really enabled! It’s happening on Chrome and Android, but not on Firefox!
Any ideas?

Posts: 1

Participants: 1

Read full topic

Broken Links in Ionic v1 Docs

Viewing all 70435 articles
Browse latest View live


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