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

[Ionic V4] Missing update instructions in CHANGELOG.md

$
0
0

@heikoheilrb wrote:

There used to be update instructions in the V3 branch.

Obviously they are missing in the V4 branch.
E.g.:
How to upgrade from Version 4.0.2 to 4.1.0?

npm install @ionic/angular@4.1.0 --save

Am I missing something?

Posts: 1

Participants: 1

Read full topic


Ionic 3/4 PayPal CheckOut problems

$
0
0

@alfanet wrote:

0

I’m using a new PayPal java script sdk not checkout.js.

I need to send payment to different merchant IDs, but it seems to work only with my merchant ID where I created a SandBox as PayPal Specifications in order to use different Merchants.

I call my client ID in the header index.html as below:

And below it is my checkout script where I would like to use different merchant ID based on the object to sell. I put the specific merchant email or merchant ID in payee command, as I suppose is wrote in the PayPal instructions, for that object. The merchant should be different depend on the object to sell, but PayPal give me an error that I’m using a different payee from the client ID. Where am I wrong?

initPayPal() {

var _totaleOrdine = this.totaleOrdine.toString();

var _merchant: string = 'XXXXXXXXX';

  paypal.Buttons({
    env: 'sandbox', // sandbox | production
      locale: 'it_IT',

      //ref: https://developer.paypal.com/docs/integration/direct/express-checkout/integration-jsv4/customize-button/
    style: {
        size: 'responsive',
        color: 'gold',
        shape: 'pill',
        label: 'buynow', //                    label: checkout, buynow, credit, pay, paypal
        tagline: false

      },

    commit: true,
    debug: true,

     createOrder: function(data, actions) {
      // Set up the transaction
        console.log(data);
        console.log(actions);

        return actions.order.create({

        application_context: {
            brand_name: "MyBrand",
        },


        purchase_units: [{

     //   reference_id:_merchant,

          amount: {
            value: _totaleOrdine,
          },

          payee: {
            email: 'merchant2@mydomain.it',
            merchant_id: 'xxxxx'
          },

          shipping: {
            address: {

                address_line_1: "Via Roma 10",
                address_line_2: "",
                admin_area_2: "Roma",
                admin_area_1: "RM",
                postal_code: "00100",
                country_code: "IT",

            },

            name:{
                full_name: "adam adami"
            },
          },

        }],
});
},
     onApprove: function(data, actions) {
      return actions.order.capture().then(function(details) {
        alert('Transaction completed by ' + details.payer.name.given_name);
       console.log(details);
        // Call your server to save the transaction
        return fetch('/paypal-transaction-complete', {
          method: 'post',
          body: JSON.stringify({
            orderID: data.orderID
          })
        });
        //
      });

    },

     onCancel: function(data, actions) {
        /*
         * Buyer cancelled the payment
         */
         console.log("Buyer cancelled the payment");
      },

     onError: function(err) {
        /*
         * An error occurred during the transaction
         */
         console.log(err);
         console.log("An error occurred during the transaction");
      }

  }).render(this.paypalbuttoncontainer2);

}

Posts: 1

Participants: 1

Read full topic

Ionic push notification with onesignal

$
0
0

@paulbuscano003 wrote:

Hi,

I’m implementing one signal with push notification with “LOCATION” filter. but I don’t know how to start. I can only do subscribed users but not with specific locations.

Please see below my app.module.ts file

 var notificationOpenedCallback = function(jsonData) {
        alert('notificationOpenedCallback: ' + JSON.stringify(jsonData));
      };

      window["plugins"].OneSignal
        .startInit(this.singal_app_id, this.firebase_id)
        .handleNotificationOpened(notificationOpenedCallback)
        .endInit();

Posts: 1

Participants: 1

Read full topic

[ngStyle] brief flash of unchanged font size

$
0
0

@joseph7 wrote:

Hey guys,

item-detail.html:

<h1 id="item_title"  *ngIf="hasProperty('name')" [ngStyle]="{'font-size': font_size}" innerHTML="{{item.name}}"></h1>

item-detail.ts:

font_size: any;

async ionViewWillEnter() {
    await getFontSize(this.settings).then((result) => {
      this.font_size = result;
    });
  }

getFontSize function in app.module.ts

export function getFontSize(settings: Settings): Promise<any> {
  return new Promise((resolve, reject) => {
    settings.getValue('font_size').then((res) => {
      let fontSize = res + 'rem';
      resolve(fontSize);
    }).catch((err) => {
      reject(new Error('failed to retrieve font size'));
    })
  })
}

So the problem is: When I change the font size in my settings page, and re-enter the item-detail page then I have a brief flash of old font_size before it is actually correctly set to newly changed size.
Any ideas?
Thanks in advance for the help.
Kind regards,
Filip

Posts: 1

Participants: 1

Read full topic

How to increment & decrement item quantity of particular item

$
0
0

@harshm90 wrote:

Hello,

I have an Array of item in shopping cart i want to update the quantity of particular item in cart when user clicks the inc or dec button

my ts file

// Fetching the data in shopping cart
this.storage.get('products').then(data => {
      for (var i = 0; i < data.length; i++) {
        this.bag.push(data[i]);
      }
      for (var i = 0; i < this.bag.length; i++) {
        this.item_qty = this.bag[i].qty;
      }
      this.incQuant();
      this.decQuant();
    }
    );

decQuant() {
    if (this.item_qty - 1 < 1) {
      this.item_qty = 1;
    }
    else {
      this.item_qty -= 1;
    }
  }

  incQuant() {
     this.item_qty += 1;
    console.log(this.item_qty);
  }

With the above code the items are being updated but instead of updating the quantity of particular item its increasing every items quantity.

how can i make the it update only the selected items’s quantity

56%20PM

Please help…

Posts: 1

Participants: 1

Read full topic

Ionic 3 Firebase Analytics with Google Tag Manager

$
0
0

@benskarunya wrote:

Hi, in our application we are using ionic 3/ Angular 4 / Cordova iOS & Android trying to implement firebase analytics with Google Tag Manager. For this i am not getting the correct documentation from internet. Can some one please suggest us. Used the below for firebase which is working fine and struggling to link GTM container with firebase,

Posts: 1

Participants: 1

Read full topic

How to store videos in Application cache with Ionic

$
0
0

@rajrock38 wrote:

My requirement is to download videos and save them in Application cache so it can only be accesible via the app only.
It should not be available in the native file system

Posts: 1

Participants: 1

Read full topic

Could not download trove4j.jar (org.jetbrains.trove4j:trove4j:20160824)

$
0
0

@saleemnasa1 wrote:

I am getting this error when I try to run ionic cordova build android

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all files for configuration ':classpath'.
   > Could not download trove4j.jar (org.jetbrains.trove4j:trove4j:20160824)
      > Could not get resource 'https://jcenter.bintray.com/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.jar'.
         > Could not GET 'https://jcenter.bintray.com/org/jetbrains/trove4j/trove4j/20160824/trove4j-20160824.jar'.
            > d29vzk4ow07wi7.cloudfront.net: Name or service not known

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 16s
[ERROR] An error occurred while running subprocess cordova.
        
        cordova build android --release exited with exit code 1.
        
        Re-running this command with the --verbose flag may provide more information

I got all the other errors about maven and etc i fixed them I think with the help of comments on stockoverflow this one is still missing. I didn’t see anything about this in ionic forms too.
Its the first time I am working with ionic 4. I worked on Ionic 1 3 years ago.

Thanks

Posts: 1

Participants: 1

Read full topic


How to display key value pair both on ionic 4 by binding it in html ? #ionic:ionic-v3

$
0
0

@Chandankbc wrote:

Hello,

i want display the following data in HTML, please help me how do i do that ?

“sales_data”: {
“10”: 77,
“11”: 174,
“12”: 42,
“13”: 1691,
“14”: 80,
“15”: 109,
“16”: 63,
“17”: 55,
“18”: 680,
“19”: 57,
},

Posts: 1

Participants: 1

Read full topic

Ionic 4 Modal using Javascript

$
0
0

@fmelo wrote:

I copied the code in your documentation https://ionicframework.com/docs/api/modal in the tab Javascript.

Then I added a button to present the modal:
<button onclick="presentModal()">Modal</button>
When I click in the button the modal is added, however it is not being displayed.
My guess is that there is something wrong with the method present in modalElement.present() that is not displaying the modal.
I added the following jquery code $('ion-modal').css('display', 'flex'); and now the modal is displayed.

My suggestion is that you review the method present() in javascript for ‘ion-modal’ elements, and that you also add a button in the example in your documentation with the action to present the modal when you click on it.

Posts: 1

Participants: 1

Read full topic

Ionic Native/Google Maps: Marker click does not work in Marker Cluster

$
0
0

@biney12 wrote:

Hi, this is my first post so I’m not fully sure how to ask for help.

I’m using Ionic V3 and Ionic Native Google Maps V4.21 to show some different places and give then functionality.
I was using the markers without Cluster and it worked well, but now I’m trying to replace the Markers for a Marker Cluster and the click event shows me the error “Cannot read property ‘indexOf’ of undefined”

My code:

I’ve been spinning around this for some hours and really I don’t know what to do, I’m following the example of the docs, maybe it’s just my mistake.

Thanks and sorry if this post is bad written.

Posts: 1

Participants: 1

Read full topic

Prevent page from being draggable

$
0
0

@hlamprecht wrote:

Hi,

when I run my app on a mobile device, I can drag the page down just like I would in a browser to trigger a reload. Is there a way to prevent this? the page header sticks to the top of the screen, but the rest not.

Thanks,

Heiner

Posts: 2

Participants: 2

Read full topic

Cannot run ionic project!

$
0
0

@Fayme wrote:

Recently i had updated my node and after that my project is not running anymore, moreover i don’t understand the issue. I am tried many different things according to the blog but nothing is working. Whenever i am trying to run it’s giving me the error:

[17:37:08]  typescript: node_modules/@ionic/pro/dist/src/services/deploy/index.d.ts, line: 120 
            Cannot find name 'CheckDeviceResponse'. 

     L119:  checkForUpdate(): Promise<CheckDeviceResponse>;
     L121:   * @description Remove the files specific to a snapshot from the device.

[17:37:08]  ionic-app-script task: "build" 
[17:37:08]  Error: Failed to transpile program 
Error: Failed to transpile program
    at new BuildError (/Users/FAY/Desktop/Skills/skills4school/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)
    at /Users/FAY/Desktop/Skills/skills4school/node_modules/@ionic/app-scripts/dist/transpile.js:159:20
    at new Promise (<anonymous>)
    at transpileWorker (/Users/FAY/Desktop/Skills/skills4school/node_modules/@ionic/app-scripts/dist/transpile.js:107:12)
    at Object.transpile (/Users/FAY/Desktop/Skills/skills4school/node_modules/@ionic/app-scripts/dist/transpile.js:64:12)
    at /Users/FAY/Desktop/Skills/skills4school/node_modules/@ionic/app-scripts/dist/build.js:109:82

This is my environment:
Ionic CLI: 4.12.0
Cordova: 8.1.2 (cordova-lib@8.1.1)
Node: 10.15.0
npm: 6.9.0
i am working on macOS version: 10.14.3.

Posts: 1

Participants: 1

Read full topic

Error load resources in ionic 4 run android or ios

$
0
0

@rubenmgar wrote:

Hi, I’ve got a project that works ok in browser, with ionic serve, but in devices it shows a blank page. In Android and in iOS. When I debug with Chrome or Safari, the problem is the same

runtime.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
styles.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
polyfills.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
cordova.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
vendor.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
main.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
/assets/icon/favicon.png:1 Failed to load resource: net::ERR_FILE_NOT_FOUND

In Safari, errors are the same. My app:`

Ionic:

ionic (Ionic CLI) : 4.10.2 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.1.1
@angular-devkit/build-angular : 0.13.5
@angular-devkit/schematics : 7.2.4
@angular/cli : 7.3.5
@ionic/angular-toolkit : 1.4.0

Cordova:

cordova (Cordova CLI) : 7.0.1
Cordova Platforms : android 7.1.0, ios 4.4.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.0.0, (and 6 other plugins)

System:

Android SDK Tools : 26.1.1 (/Users/Ruben/Library/Android/sdk/)
ios-deploy : 1.9.4
NodeJS : v8.12.0 (/Users/ruben/.nvm/versions/node/v8.12.0/bin/node)
npm : 6.4.1
OS : macOS High Sierra
Xcode : Xcode 10.1 Build version 10B61`

I’ve been reading about some similars problems, and tryed to remove platforms, and add again. Also if I try to emulate iOS, the same blank page.
Thank you,

Posts: 1

Participants: 1

Read full topic

In app browser alternative

$
0
0

@blondie63 wrote:

Hi All, someone have notice about a plugin better than In App Browser, like Facebook and Instagram are using for advertising ?

Thanks

Posts: 1

Participants: 1

Read full topic


Full screen slides / photo gallery

$
0
0

@brenden wrote:

I need a way to view images in the full screen on devices and be able to swipe between them. Currently I have an ion-slides component that allows swiping through pictures and a PhotoViewer native plugin to allow opening an individual picture in full screen, but I have found no way to swipe between images in the PhotoViewer or view the ion-slides in full screen.

There is an un-maintained plugin that does this but does not work with Ionic 4 (https://www.npmjs.com/package/ionic-gallery-modal).

Is there no simple way to do this? It seems like such a basic use case to me.

Posts: 1

Participants: 1

Read full topic

Render HTML

Select placeholder color

$
0
0

@eebrando wrote:

Does anyone know how to style the placeholder content for an ion-select in ionic 4? I’ve tried ::placeholder, I’ve tried --ion-placeholder-color, I’ve tried throwing !importants at everything, and I’ve tried changing opacities.

No matter what I do the select placeholder is a super light gray that is nearly illegible. This is for an ionic 4 app using Angular in Firefox.

Posts: 3

Participants: 1

Read full topic

Ionic 4 swiper virtual scrol

$
0
0

@msharaf wrote:

ion-slides doesn’t support virtual dom as swiper api do
https://idangero.us/swiper/api/#virtual

i am able to get it to work by reinitiation the swiper object

is there is anyone has the luck to get it to work by just passing the options
or am I missing anything


 <ion-slides
                [options]="{virtual:{slides:['slide1','slide2']}}"
    >


   let slider = new Swiper('.swiper-container', {
          
          virtual: {
            slides: (function () {
              const slides = [];
              for (let i = 0; i < 2000; i++) {
                slides.push('<img  src="assets/' + i + '.png" class="slide-image swiper-slide">');
               }
              return slides;
            }()),
          },
         });

Posts: 1

Participants: 1

Read full topic

Why Events Doc is missing in ionic v4 page?

$
0
0

@sonicwong wrote:

Why Events Doc is missing in ionic v4 page?

Just like the doc for v3.
(import path change: import { Events } from ‘@ionic/angular’:wink:

Posts: 1

Participants: 1

Read full topic

Viewing all 49220 articles
Browse latest View live


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