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

Tabs and Navigation Disappear When using Web Components

$
0
0

@jamesajohnon wrote:

I’m using Vue to developer a PWA. I’ve imported the Ionic v4 web components and have them displayed in the app. However, when changing the route, some components don’t display visibility: hidden;.

Note, I’m not using Ionic Vue (because it’s still in beta), I’ve imported the components as web components instead.

The elements that don’t display don’t have the .hydrated class or they are a child of an element without the .hydrated class.

I’m also not using the ionic router, but Vue router instead. Here’s a sandbox of the app https://codesandbox.io/s/ionic-vue-k7eiv

Anyone any ideas why this might be? Would be really cool to get this working

Posts: 1

Participants: 1

Read full topic


Build --prod and HTTP

$
0
0

@pimol wrote:

Which is the difference between building with --prod flag and without?

I have a simple app to send a post to the onesignal service, using HTTP (cordova-plugin-advanced-http).

It works well with ionic cordova run android --dev.
So I run ionic cordova build android --prod and send the apk to a device. It run but does not post anything (the http post has an error undefined). After a while and many curse, I find out that the apk built with

ionic cordova build android

is OK! I retry ionic cordova run android --dev and this one does not work.

Pietro

Posts: 1

Participants: 1

Read full topic

How to use custom webpack configuration in Ionic 4

$
0
0

@newtonmunene wrote:

Hi Guys,
How can I extend the Default Webpack config and use a custom one?

I’m trying to use a package that requires some extra webpack configuration and I’m not sure how to do this. Ever since Angular 6, it’s been kind of complicated to do this. Who knows how?

I’ve tried following some tutorial around:

  1. https://javascripttuts.com/using-a-custom-webpack-configuration-in-an-ionic-4-application/
  2. https://alligator.io/angular/custom-webpack-config/

Which led me to

@angular-builders/dev-server:generic

and

@angular-builders/custom-webpack:browser

I, however, ran into an error whenever I try to build, serve.

Schema validation failed with the following errors:
  Data path ".builders['browser']" should have required property 'class'.

Posts: 1

Participants: 1

Read full topic

How to disable page transition in Ionic 4 / Angular?

$
0
0

@Jil wrote:

Hey guys,

I’m using ‘routerLink’ to navigate to a new page and I was wondering how I could disable the page transition? I couldn’t find an answer to that simple question in the documentation or here, could someone please point me to the right spot? :hugs:

Many thanks!
Jil

Posts: 1

Participants: 1

Read full topic

Paypal integration error

$
0
0

@dhrenx wrote:

Export class PaypalpagoPage implements OnInit {
totalfare: number;

paymentAmount = ‘totalFare’;
currency: string = ‘EUR’;

ngOnInit () {

This TotalFare = Mathematics. round (this. serviceProvider. tripDistance * this. serviceProvider. farePerKm + this. serviceProvider. rateBase);

}
Pay with PayPal () {
this paypal. in that ({
PayPalEnvironmentProduction: ‘’,
PayPalEnvironmentSandbox: ‘ASdoJu_T3ORqC2AI-Hx2UYTa8afcSOmyVZMr_KDdaXvufeX6-S7CuTjgyhEYy1_uaSSsjkgtD4qbQS3o’
}). then (() => {
// Environments: PayPalEnvironmentNoNetwork, PayPalEnvironmentSandbox, PayPalEnvironmentProduction
this paypal. prepareToRender (‘PayPalEnvironmentSandbox’, new configuration of PayPal ({
acceptCreditCards: true,
})). then (() => {
console log (this. totalFare);
leave payment = new PayPalPayment (this.paymentAmount, ‘EUR’, ‘Description’, ‘exit’);
this paypal. renderSinglePaymentUI (payment). then (() => {
this route navigate ([’/ reservation confirmation’]);
Totalfare calculates an operation that is the distance * km. This has to give a number that is the price that the user has to pay.
I have put paymentAmount = ‘totalfare’. The problem is that I do not open PayPal when I click on the button

Posts: 1

Participants: 1

Read full topic

Ionic 3 sidebar breaking for IOS only

Ionic & Stencil Confusion with PWA

$
0
0

@abusharaf wrote:

Hello all,

I have been reading a lot for quite a long time regarding PWAs from different resources (Google, Ionic, Open Source Contributor, Whitepapers from Gartner, and others…)

But I am confused about the role of stencil in the PWA, as it’s mentioned that stencil mainly is a design system used for building web components that will work in an efficient manner for all platform types while handling the lazy loading setup, code splitting, and optimize the bundle size of the final product

While on the other hand, the Ionic framework is the actual UI system holds all the components built as web components from stencil compiler and with addition for integrations with popular frameworks like (Angulat, React, and Vue).
However, there is a way to build the ionic app as PWA from the docs, but there is a way also to build pwa from stencil using either (App selection type, or ionic-pwa) when we run

npx create-stencil ionic-pwa 

So what are the difference between those too, and keep in mind that as per Ionic team announcements the Stencil project is intended only for designing and building web components and the rest of the actual work is done on the ionic side.

Another sentence from ionic team is

The Ionic PWA Toolkit also provides our recommended setup for building production ready
PWAs with Ionic, including the open source Stencil (an open source project from the Ionic
team) for your app logic and the open source Ionic Framework for your user interface.

So how come Stencil is used for handling the app logic while stencil should not be used like this?

Please correct my understanding.

And many thanks for you all…

Posts: 1

Participants: 1

Read full topic

Navigating another page within tab (Ionic 4) returns blank page

$
0
0

@wyee wrote:

Hi,

Can anyone help me in Ionic 4, when navigating another page (site2article), within tab2, it returns blank page? I know site2article page has proper content (working html and .ts) because it previously load on the app but outside the tabs / tab bar. I got it to stay in the tabs but blank page. There’s no error in console log.

tab2.page.html:
<ion-item *ngFor=“let site of filteredsites” href="/tabs/(tab2:site2article)">

tab2.page.ts:
import { Site2articlePage } from ‘…/site2article/site2article.page’;

tabs.module.ts:
import { Site2articlePageModule } from ‘…/site2article/site2article.module’;

@NgModule({
imports: [
Site2articlePageModule
],
declarations: [TabsPage]
})

tabs.router.module.ts:
import { Site2articlePage } from ‘…/site2article/site2article.page’;

const routes: Routes = [
{
path: ‘tabs’,
component: TabsPage,
children: [
{ path: ‘tab1’, loadChildren: ‘…/tab1/tab1.module#Tab1PageModule’ },
{ path: ‘tab2’, loadChildren: ‘…/tab2/tab2.module#Tab2PageModule’ },
{ path: ‘site2article’, outlet: ‘tab2’, loadChildren: ‘…/site2article/site2article.module#Site2articlePageModule’ },
{ path: ‘tab3’, loadChildren: ‘…/tab3/tab3.module#Tab3PageModule’ },
]
},
{
path:’’,
redirectTo:’/tabs/tab1’,
pathMatch:‘full’
}
];

app-routing.module.ts:
const routes: Routes = [
{ path: ‘’, loadChildren: ‘./tabs/tabs.module#TabsPageModule’ },
{ path: ‘site2article’, loadChildren: ‘./site2article/site2article.module#Site2articlePageModule’ }
];

Posts: 1

Participants: 1

Read full topic


Developer needed to break down UI into Ionic 4 for iPhone mobile app templates

$
0
0

@Humuhumufush wrote:

Ionic 4 mobile app templates for iPhone to be created based on illustrator files. Github access available. There will be about 20 screens or elements to be created. The ionic freelancer must have excellent experience with Ionic Framework and the work must be pixel perfect. What I mean by this is that the reference files must be exactly duplicated in the templates you create.

Posts: 1

Participants: 1

Read full topic

Add another button to ion-select

$
0
0

@mahmoudAbuhadr wrote:

I want to add another button to ion-select alongside ok and cancel , when i add buttons array to the interface options it gets ignored

Posts: 1

Participants: 1

Read full topic

Ionic camera viewfinder to show guideline

Ionic 4 nested tabs ion-tab-button 'tab' property is not working properly for nested tabs

$
0
0

@fazlarabby wrote:

I am using ion-tabs for my frontend angular ionic app. I am using nested tabs, So 1st ion-tabs have 3 tabs, Tab 1, Tab 2, feature-tabs and feature-tabs has 3 tabs, Tab 4, Tab 5, Tab 6. I have used the Angular routing.

So the routes look like the following:

  1. tabs/tab1,
  2. tabs/tab2,
  3. tabs/feature-tabs/tab4,
  4. tabs/feature-tabs/tab5,
  5. tabs/feature-tabs/tab6

The issue when feature-tabs is selected Tab 4 is the active route by default but the property ‘tab’ in the ion-tab-button when kept similar to the path (i.e. tab =“tab4”) in the routing the default as recommended Tab 4 works but selecting/click on the tabs gives an error of Cannot match any routes. URL Segment: ‘tabs/tab1’. This means that the ‘tab’ property of the ion-tab-button is referring to the parent tabs. When I change the property ‘tab’ in the ion-tab-button to “feature-tabs/tab4” (not recommended), everything works but the --color-selected css property of the ion-tab-button doesn’t work. But my question is why the tab property is referring to the patent tabs and how can I refer back to the child feature-tabs?

I have already tired to change the css property but it simply doesn’t work,

ion-tab-button{
--color-selected: #a0a;
}

This is my routing for the tabs,

import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { TabsPage } from './tabs.page';


const routes: Routes = [
    {
        path: '',
        component: TabsPage,
        children: [
            {
                path: 'tab2',
                loadChildren: './../tab2/tab2.module#Tab2PageModule'
            },
            {
                path: 'tab1',
                children: [
                    {
                        path: '',
                        loadChildren: '../tab1/tab1.module#Tab1PageModule'
                    }
                        ]
                    }
                ]
            },

            {
                path: 'feature-tabs',
                loadChildren: '../feature-tabs/feature-tabs.module#FeatureTabsPageModule'
            },

        

            {
                path: '',
                redirectTo: './tabs/tab1',
                pathMatch: 'full'
            }

        ]
    },
    {
        path: '',
        redirectTo: '/tabs/tab1',
        pathMatch: 'full'
    }
];

@NgModule({
    imports: [RouterModule.forChild(routes)],
    exports: [RouterModule]
})
export class TabsRoutingModule { }

This is tabs html,

<ion-content>
  <ion-tabs>
    <ion-tab-bar slot="bottom">
      <ion-tab-button tab="tab1">
        <ion-label>Tab1</ion-label>
        <ion-icon name="pricetags"></ion-icon>
      </ion-tab-button>
      <ion-tab-button tab="tab2">
        <ion-label>Tab2</ion-label>
        <ion-icon name="podium"></ion-icon>
      </ion-tab-button>
      <ion-tab-button tab="feature-tabs">
        <ion-label>Feature tabs</ion-label>
        <ion-icon name="cash"></ion-icon>
      </ion-tab-button>
    </ion-tab-bar>
  </ion-tabs>
</ion-content>

this is my feature-tabs routes:

import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { FeatureTabsPage } from './feature-tabs.page';

const routes: Routes = [
    {
        path: '',
        component: FeatureTabsPage,
        children: [
            {
                path: 'tab4',
                children: [
                    {
                        path: '',
                        loadChildren: './../tab4/tab4.module#Tab4PageModule'
                    }
                ]
            },
            {
                path: 'tab5',
                children: [
                    {
                        path: '',
                        loadChildren: './../tab5/tab5.module#Tab5PageModule'
                    }
                ]
            },
            {
                path: 'tab6',
                children: [
                    {
                        path: '',
                        loadChildren: './../tab6/tab6.module#Tab6PageModule'
                    }
                ]
            },
            {
                path: '',
                redirectTo: '/tabs/feature-tabs/tab4',
                pathMatch: 'full'
            }
        ]
    },
    {
        path: '',
        redirectTo: '/tabs/feature-tabs/tab4',
        pathMatch: 'full'
    }
];

@NgModule({
    imports: [RouterModule.forChild(routes)],
    exports: [RouterModule]
})
export class FeatureTabsRoutingModule {}

this is the html for the feature-tabs:

<ion-content>
  <ion-tabs>
    <ion-tab-bar slot="top">
      <ion-tab-button tab="tab4">
        <ion-icon name="calendar"></ion-icon>
        <ion-label>tab4</ion-label>
      </ion-tab-button>

      <ion-tab-button tab="tab5">
        <ion-icon name="contacts"></ion-icon>
        <ion-label>tab5</ion-label>
      </ion-tab-button>

      <ion-tab-button tab="tab6">
        <ion-icon name="information-circle"></ion-icon>
        <ion-label>tab6</ion-label>
      </ion-tab-button>
    </ion-tab-bar>
  </ion-tabs>
</ion-content>

Posts: 1

Participants: 1

Read full topic

Uploading Data_URL images using File Transfer Plugin

$
0
0

@arulyan wrote:

I Just followed Simon Grimm tutorial for uploading images to server, but instead of using mongodb I used mysql. The Backend is functional, i checked it using postman. On the front-end that is ionic, everything is working except the uploading part. After a long analysis, i have figured out that there is a problem in the imagePath. Since he was using the destination type as FILE_URI and i am using DATA_URL.



Posts: 1

Participants: 1

Read full topic

Android services not working

$
0
0

@spkprav wrote:

I created a Job service in android native, which sends a notification every few minutes, it works perfectly without any issues. I created a new ionic plugin and copied all the files and necessary configuration into the config.xml file. Everything looks perfect, no error. on Initiating the service, I get no errors, yet the service doesn’t start, I tried a lot of variants and everything works perfectly with the native Android application, but none works when pulled into the ionic plugin. Any help would be appreciated.

I see that Ionic is blocking services from plugin or something, not sure. after the build, I can see my code properly stored and configuration added into androidmanifest file too, exactly like what I have in android native code, yet it doesn’t do anything.

Posts: 1

Participants: 1

Read full topic

Install the ImagePicker plugin: 'ionic cordova plugin add cordova-plugin-telerik-imagepicker'

$
0
0

@Manel00 wrote:

Hi everyone,

I have this problem on Ionic 4, i already have installed and --save the plugin but still getting the same error, what should I do to fix it? Thank you so much.

Regards

Posts: 1

Participants: 1

Read full topic


Loading huge data in Ionic 4 storage

$
0
0

@Marko-Matijevic wrote:

Hello,

I need some advice using local storage.
I am building an app that required to load 2 GB (and more) of file size at the start of the app and store it into local storage. Because app should work also offline if user is located at the place where there is no internet.
Thanks

Posts: 1

Participants: 1

Read full topic

[ERROR] cordova-res was not found on your PATH

$
0
0

@AbdelDev wrote:

Hello,

i have a problem in my app ionic 4, when i run ionic cordova platform add android i hot this error :
[ERROR] cordova-res was not found on your PATH. Please install it globally:
npm i -g cordova-res

Posts: 1

Participants: 1

Read full topic

How to show a presentAlert intside a then method of adding collection on Firebase?

$
0
0

@Manel00 wrote:

Hi everyone,

I’m using Ionic 4 and I cannot reach the presentAlert method from out of this method, what should i do?:

    this.afs.collection("collection").add(this.object)
      .then(function () {
        console.log("Object successfully written!");
        return this.presentAlert() //Doesn't work

      })

async presentAlert() {
    const alert = await this.alertController.create({
      header: 'Thank you!',
      message: 'This Object has been uploaded succesfully :)',
      buttons: ['OK']
    });
    await alert.present();
  }

Posts: 1

Participants: 1

Read full topic

Error deploying components in Google Chrome

$
0
0

@FranciscoMartin1 wrote:

Hi everyone,

I am writing because of I suffer some failures when I load my website, some components does not load properly. The error just occur in Google Chrome. In other navigators like Firefox or Microsoft Edge works without any failures. the version I am using of Google Chrome is 75.0.3770.90 (Official Build) (64-bit), but on this version, in my mobile the website works perfectly. Besides, if I load the website with the developer console opened it works. I attach an image about the failure. The URL of the website is http://150.214.150.155/ .

I hope someone can help me.

Regards.

Francisco Martin.

Posts: 1

Participants: 1

Read full topic

Has anyone gotten Ionic 4 to play well with Angular Ivy?

$
0
0

@AaronSterling wrote:

My real goal is Angular Ivy elements with Ionic subcomponents. But if I can get Ionic 4 to dance with Angular Ivy I’m pretty sure I can get the rest of the way myself. For those interested, a good explainer about how to build web components with Ivy is here. You need to use an API that is still private, but the current expectation is that it will be formally exposed in Angular 9.

I’m getting compilation errors when trying to build Angular Ivy + Ionic for production. I’m not sure whether I’m missing something simple, or whether the two don’t talk together yet.

Thank you!

Posts: 1

Participants: 1

Read full topic

Viewing all 70434 articles
Browse latest View live


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