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

How to force an ion-content to scroll to bottom when the height changes

$
0
0

@patrickpirzer wrote:

Hello,
In our Ionic app we have a page with an ion-content in which are some elements.
The ion-content has a vertical scrollbar because of it’s content it’s higher than the screen.
At the bottom of the ion.content is an ul-element with a handfull of listitems.
When we open that ul the height of the ion-content and the vertical scrollbar changes because the list was opened, but it doesn’t scroll to the bottom automatically.

What can we do to force an automatic scroll-to-bottom in that special case?

Thanks in advance.
Patrick

Posts: 1

Participants: 1

Read full topic


How to display a page with tabs in modal with Ionic 4

$
0
0

@laurineWermann wrote:

I have a simple page in Ionic 4 with 3 tabs.

I need to open this page in a modale, but if I do a simple :

let profileModal = await this.modalCtrl.create({
      component: MyPage
    });
profileModal.present()

I get
Error: Cannot match any routes. URL Segment: 'tabone'
and Mypage’s tab contain the component of the current route instead of its tabs’component

the routes for the tabs are in “MyPageModule”, but I can’t display it in modal, there is only a “component” option in modal, not a “module” option

How can I display MyPage in a modale ?

Posts: 1

Participants: 1

Read full topic

[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

How to create fade-In animation in scroll item in ionic V1.5?

$
0
0

@gokujy wrote:

I want scroll data animate like this video using ionic v1.5: link

i have old app and i want create scroll as in this video. for this i tried animate.css mad many JavaScript, ng-animation and wow effect. but all css running only one time. when we scroll first time css working but after it not working.

please help :slight_smile:

Posts: 1

Participants: 1

Read full topic

NullInjectorError: No provider for Contacts!

$
0
0

@lblanes wrote:

I followed the documentation of the link https://ionicframework.com/docs/native/contacts but when running on the device I get the error ‘NullInjectorError: No provider for Contacts!’

Chrome Inspect Log

ERROR Error: StaticInjectorError(AppModule)[Contacts]: StaticInjectorError(Platform: core)[Contacts]: NullInjectorError: No provider for Contacts! at NullInjector.push../node_modules/@angular/core/fesm5/core.js.NullInjector.get (core.js:8895) at resolveToken (core.js:9140) at tryResolveToken (core.js:9084) at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:8981) at resolveToken (core.js:9140) at tryResolveToken (core.js:9084) at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (core.js:8981) at resolveNgModuleDep (core.js:21217) at NgModuleRef_.push../node_modules/@angular/core/fesm5/core.js.NgModuleRef_.get (core.js:21906) at injectInjectorOnly (core.js:1773)

Ionic Info

ionic (Ionic CLI) : 4.12.0 (C:\Users\Leandro\AppData\Roaming\npm\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) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : android 7.1.4
Cordova Plugins : not available

System:

Android SDK Tools : 26.1.1 (C:\Users\Leandro\AppData\Local\Android\Sdk)
NodeJS : v8.12.0 (C:\Program Files\nodejs\node.exe)
npm : 6.7.0
OS : Windows 7

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


Ionic 4 - Native: tried accessing the SQLite plugin but it's not installed

$
0
0

@sisdev wrote:

Hey guys,

I’m facing today some odd problems.

My Ionic version was 4.9.0 + some other plugins + sqlite and everything was ok.
Now today I’ve updated ionic to 4.12.0 and I get the error message:
“Native: tried accessing the SQLite plugin but it’s not installed.” although the plugin is already installed.

I’ve done this so far to solve the problem but this hasn’t helped.

  1. uninstall sqlite and install again
  2. uninstall android platform and install again
  3. downgrade ionic to 4.9.0 and then step 1 and step 2

I’m still getting the same error.

Does anyone else have this issue?

Thanks

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: 1

Participants: 1

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

Store a Imagem in Ionic Storage [V3]

$
0
0

@ThiagoCasm wrote:

I Have a app, and i Need store a image in Ionic-storage like a this.storage.set('Image', IMAGEDATA );, and after store the data, when i open the index page for exemple, execute a Function FileTransfer.upload for upload this image… Thanks

Posts: 1

Participants: 1

Read full topic

Viewing all 71531 articles
Browse latest View live