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

If statement behaving like for loop

$
0
0

@salad-gg wrote:

I have an event listener that is supposed to call an alert controller if a given value is >1:
But I get multiple popups simultaneously, why is that the case.

Using return statement solved the problem, many calls to alert method when not using return.

    this.events.subscribe("books-count", out => {
      let keyz = Object.keys(out);
      if (keyz.length > 1) {
        //this.alertMe();
        return this.alertMe();
      }
    });

Posts: 1

Participants: 1

Read full topic


How to check all previous checkbox on condition

$
0
0

@pksquare wrote:

checkbox%20condition

i have these 4 checkboxes on a page. I want if i check check box number 3 checkbox 1 and checkbox 2 should be checked automaticcaly . how i do this ?

Posts: 1

Participants: 1

Read full topic

Can anyone give me the easiest one clearcut steps to implement firebase push notification in ionic3

Ionic 2 ssl pinning

$
0
0

@aruna0901 wrote:

Hi All,

I’m struggling with ssl pinning in our ionic 2 application. I tried with sslchecker which works fine in android with SHA 256 fingerprints. but the same is not working in iOS. So we installed the previous version of this plugin and used SHA1 fingerprints, which is working fine in both android and iOS.
But we would like to use only SHA256 fingerprints as SHA1 is absolete.

I also tried using cordova-plugin-advanced-http plugin and placed .cer file in www/sertificates folder. But this always returns the success callback even when i use a wrong certificate or no certificate.
Here is my code:

import { HTTP } from ‘@ionic-native/http’;
constructor(public ihttp:HTTP) {
}

postRequest()
{
this.ihttp.setSSLCertMode(‘pinned’).then(success=>{
console.log(“ssl connection secured”,success);
this.post(params);

                    },(err)=>{
                        this.loading.hide();
                        console.log("ssl connection not secured",err)

                    });    

}

Any help would be highly appreciated.

Thanks,
Aruna.

Posts: 1

Participants: 1

Read full topic

How to refresh the page after closing model in ionic 3

Apple Music Kit JS

$
0
0

@VitoFromEarth wrote:

Im trying to integrate Apples Music Kit into the app. But at auth in build version i get redirected to a browser tab. From there the app does not collect anything from session and i can’t get dev token. I tried use InAppBrowser package to override window.open to be in in app browser but there is no use in it. Inside apple’s script i found out that script creates a form via document.createElement(“form”)

ServiceSetupView.prototype._buildFormElement = function (e, t, r) {
        void 0 === t && (t = this.target), void 0 === r && (r = this.developerToken);
        var i = document.createElement("form");
        i.setAttribute("method", "post"), i.setAttribute("action", e), i.setAttribute("target", t), i.style.display = "none";
        var n = document.createElement("input");
        n.setAttribute("name", "jwtToken"), n.setAttribute("value", r), i.appendChild(n);
        var o = document.createElement("input");
        o.setAttribute("name", "isWebPlayer"), o.setAttribute("value", "true"), i.appendChild(o);
        var a = document.createElement("input");
        return a.setAttribute("name", "LogoURL"), a.setAttribute("value", "test"), i.appendChild(a), i
      }

I tried to replace

 i.setAttribute("target", t)

with

 i.setAttribute("target", "_self")

and it did work in dev env when app launches in browser but on native build it still opens a system browser :confused:

If someone had such issue before and can help it would be great. Thanks!

Posts: 1

Participants: 1

Read full topic

Unexpected end of json input

$
0
0

@Alzmoth wrote:

As i was using ionic3 procject working and still apk working well . Ionic auto v4 updated and now i get this error " Unexpected end of JSON input"

i using mysql beckend

i changed ionic version 4 to 3.4 , but still i get same error. how can fix it

I unable to solve it ,anyone know please teach me i will appreciate~

login.ts

login(){
   if(this.userData.username && this.userData.password){
    this.authService.postData(this.userData, "login").then((result) =>{
    this.resposeData = result;

auth.service.ts

 postData(credentials, type){

    return new Promise((resolve, reject) =>{
      let headers = new Headers();
      this.http.post(apiUrl+type, JSON.stringify(credentials), {headers: headers}).
      subscribe(res =>{
        resolve(res.json());
      }, (err) =>{
        reject(err);
      });

    });

  }

Posts: 1

Participants: 1

Read full topic

I try to use Device Orientation plugin but i get this error


Subheader The animation entered by the page is not

Ion-tab :after css selector

$
0
0

@joseph7 wrote:

Hey guys,

I’m currently having trouble figuring things out. I have three 's inside , and I’d like each of the three to have separate scss :after property. Right now what I did was:

  1. run ionic serve --lab
  2. right click on tab and inspect it
    And here i found out that each of these three tabs has their individual # which goes like id=“tab-t1-0”, tab-t1-1 and tab-t1-2. Issue is, these numeric values change each time user clicks on the tab.
    My code so far:
    tabs.html
<div class="tabs-wrapper">
  <ion-tabs>
    <ion-tab [root]="tab1Root" tabIcon="home" class="home_tab"></ion-tab>
    <ion-tab [root]="tab2Root" tabIcon="search" class="search_tab"></ion-tab>
    <ion-tab [root]="tab3Root" tabIcon="cog" class="cog_tab"></ion-tab>
  </ion-tabs>
</div>

tabs.scss

 page-tabs {
    .tabs-wrapper {
      #tab-t0-0 {
        position: relative !important;
      }
      #tab-t0-0:after {
        content: '' !important;
        width: 1px !important;
        position: absolute !important;
        right: 0 !important;
        top: 25% !important;
        height:50% !important;
        background-color: #013374 !important; // The color of your border
      }
      #tab-t0-1 {
        padding-right: 30% !important;
        padding-left: 30% !important;
      }
      #tab-t0-2 {
        position: relative !important;
      }
      #tab-t0-2:after {
        content: '' !important;
        width: 1px !important;
        position: absolute !important;
        left: 0 !important;
        top: 25% !important;
        height:50% !important;
        background-color: #013374 !important; // The color of your border
      }
}

And I’m having trouble accessing specific tab scss by id or classname.
Any ideas?

Posts: 1

Participants: 1

Read full topic

Has anyone made the switch to react native, or ionic for iOS?

$
0
0

@Baskyabro wrote:

Hello everyone,
I work with both native iOS (Swift & Obj-C) and Ionic in my day to day job. Been working with Ionic since V1 and native iOS for about 4 years now.

Ionic has its charm. I mean writing one codebase to run on iOS and Android is sweet and can seem like it solves a lot of problems and saves time. However, once you grow beyond simple apps with it, it gets a bit tougher. There’s just more nuances with it and a still a bit of “oh yeah this is a known issue”. Also I really like the design aspect of app development too and I just do the think hybrid apps give the same UX as native ones.

I definitely prefer native development and think it’s capable of so so much more and always will be than hybrid dev.

Hybrid apps definitely have their place, I just think if you’re serious about building, maintaining and adding features to an app, you will inevitably reach a point where you need to, or wish you already had, made it native.

Posts: 1

Participants: 1

Read full topic

Ionic 4 - Windows platform is not working

$
0
0

@veerhunter wrote:

Ionic 4 windows platform is not working.

“dependencies”: {
@angular/animations”: “^7.2.2”,
@angular/cdk”: “^7.2.2”,
@angular/common”: “^7.2.2”,
@angular/core”: “^7.2.2”,
@angular/forms”: “^7.2.2”,
@angular/http”: “^7.2.2”,
@angular/material”: “^7.2.2”,
@angular/platform-browser”: “^7.2.2”,
@angular/platform-browser-dynamic”: “^7.2.2”,
@angular/router”: “^7.2.2”,
@ionic-native/core”: “^5.0.0”,
@ionic-native/file”: “^5.0.0”,
@ionic-native/http”: “^5.0.0”,
@ionic-native/splash-screen”: “^5.0.0”,
@ionic-native/status-bar”: “^5.1.0”,
@ionic/angular”: “^4.0.0”,
@ngx-translate/core”: “^11.0.1”,
@ngx-translate/http-loader”: “^4.0.0”,
“chart.js”: “^2.7.3”,
“cordova”: “8.1.2”,
“cordova-android”: “7.0.0”,
“cordova-android-support-gradle-release”: “^2.0.1”,
“cordova-plugin-advanced-http”: “2.0.4”,
“cordova-plugin-device”: “^2.0.2”,
“cordova-plugin-file”: “^6.0.1”,
“cordova-plugin-file-transfer”: “^1.7.1”,
“cordova-plugin-ionic-keyboard”: “^2.1.3”,
“cordova-plugin-ionic-webview”: “3.1.1”,
“cordova-plugin-splashscreen”: “^5.0.2”,
“cordova-plugin-statusbar”: “2.4.2”,
“cordova-plugin-whitelist”: “^1.3.3”,
“cordova-windows”: “6.0.1”,
“core-js”: “^2.5.4”,
“ng2-charts”: “^1.6.0”,
“rxjs”: “^6.3.3”,
“zone.js”: “~0.8.29”
}

This is my project state.
Please help me. Thanks.

Posts: 1

Participants: 1

Read full topic

What is the right component to simulate bus seats arrangement

$
0
0

@salad-gg wrote:

Hi there;

Can someone please suggest to me the appropriate component to use to display a bus sitting arrangement. My guess is using grid but I want to be sure before I start the actual coding.

Posts: 1

Participants: 1

Read full topic

Multiple ionic 3 app to single ionic app

$
0
0

@amalk wrote:

Hi,

I need to merge two ionic v3 application in to one single project without breaking overall structure,
Both app should work individually,

For Example i needed to merge two existing application in ionic v3 (Car pooling application and bus booking application in a same project)

The customer can choose anyone of two application when they open the main project application
Please help me out.

I dont know to explain it more than this.

Posts: 1

Participants: 1

Read full topic

Bug ionic 4

$
0
0

@fahd123 wrote:

I have one bug when i cklick back the page , page.ts he don’t execute
whyyy??

ngOnInit() {

      
      this.storage.get('id').then((res)=>{
        if(res) {
          
          this.router.navigate(['espace-client']);
        }
        
      });
        
      
  }

this code don’t execut when click back

Posts: 2

Participants: 2

Read full topic


Ionic live reload not working on Samsung's running android 9

$
0
0

@RamonVermeulen wrote:

I tested ionic cordova run android --device -l on a Samsung S8 and S9 both running android 9.0. In both cases the app kept freezing on the splash screen. I tested it on an Pixel android 9.0 device as well and it was working fine. Without the live reloading flag it is working fine as well on these Samsung devices. Is there any bug related to live reloading on samsung devices (S8 / S9) running android 9.0? Live reloading is working on another Samsung Galaxy J5 device running android 8.1.

ramon@ramon-N8xxEZ:~/some_ionic_project$ ionic info

Ionic:

   ionic (Ionic CLI)  : 4.10.3 (/usr/lib/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 6.4.0, ios 4.5.4
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 1.2.1, (and 14 other plugins)

System:

   Android SDK Tools : 26.1.1 (/home/ramon/Android/Sdk)
   NodeJS            : v8.15.0 (/usr/bin/node)
   npm               : 6.7.0
   OS                : Linux 4.18

Posts: 1

Participants: 1

Read full topic

Ionic Appflow platform security

$
0
0

@ionictfe wrote:

We’re currently evaluating the app flow platform and have a question regarding the security of the platform. I’d like to know if there is any information available about the security level of the platform in terms of ISO certifications, security audit standards, security measures that are in place to prevent breaking into the platform or stealing information, etc.

If anyone of the app flow team can chime in on this, much appreciated!

Posts: 1

Participants: 1

Read full topic

Contacts are not working, not invoked at all

$
0
0

@iscorobogaci wrote:

    addContact(): void {
        alert('addContact invoked');
        let contact: Contact = this.contacts.create();
        contact.name = new ContactName('', 'Smith', 'John');
        let number = new ContactField('mobile', '6471234567');
        contact.phoneNumbers = [number];
        alert('contact created + ' + contact.name + ' ' + contact.phoneNumbers);
        contact.save().then(
            () => alert('Contact saved!' + contact),
            (error: any) => alert('Error saving contact.' + error)
        ).catch(error => {
            alert('error occurred while adding contact')
        });
        alert('Contact should be saved');
    }

Posts: 2

Participants: 1

Read full topic

Ionic 4 Mock Providers

$
0
0

@ExplosionPills wrote:

Ionic 3 exported some testing utilities from ionic-angular/util/mock-providers such as mockNavController and mockPlatform.

Ionic 4 no longer seems to export any such mocks from @ionic/angular or otherwise. Is there a preferred way to mock Ionic providers/services?

Posts: 1

Participants: 1

Read full topic

[Ionic4] Modal not showing but no error is given

$
0
0

@kneeki wrote:

I am trying to show a modal in my app which previously worked without any issues. The page I’m trying to launch it from doesn’t appear to matter because I have the same result in any page, even the ‘legal’ pages where there isn’t any code really. I’m about 100% sure I have the modal component correctly declared in app.module.ts and I’m launching it correctly in my page file(s). Anyone have any experience with this?

page1.page.ts

// ...
import { GatherInfoComponent } from 'src/app/Modals/gather-info/gather-info.component';
// ...

  async gatherInfo() {
    console.log('Open Modal...');
    const modal = await this.modal.create({
      component: GatherInfoComponent,
      componentProps: { user: this.us }
    });

    return await modal.present().catch((error) => {
      console.log(error);
    });
  }

app.module.ts

// ...
import { GatherInfoComponent } from 'src/app/Modals/gather-info/gather-info.component';
// ...

@NgModule({
  declarations: [
    // ...
    GatherInfoComponent 
  ],
  entryComponents: [
    // ...
    GatherInfoComponent 
  ],

p.s.
As a test I created a new Ionic4 project with nothing but a test modal and it worked without a problem; so I don’t think this is an Ionic issue.

Posts: 1

Participants: 1

Read full topic

Viewing all 70440 articles
Browse latest View live


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