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

Ionic Menu Questions

$
0
0

@TheAnonymousMode wrote:

Hello guys,

I’ve two Angular components. The first contains a button to show/hide the side navigation.

  1. component:
   <ion-menu-button>buton
      <ion-icon slot="start" name="menu"></ion-icon>
    </ion-menu-button>`

2.component

<ion-split-pane>
    <ion-menu contentId="sideMenu" type="overlay">
        <ion-header>
            <ion-toolbar>
                <ion-title>Side Menu</ion-title>
            </ion-toolbar>
        </ion-header>
        <ion-content>
            <ion-list>
                <div *ngIf="navigationElement.data">
                    <ion-menu-toggle auto-hide="false" *ngFor="let item of navigationElement.data.sideNavigation">
                        <ion-item>
                            <ion-label>{{item.title}}</ion-label>
                        </ion-item>
                    </ion-menu-toggle>
                </div>
            </ion-list>
        </ion-content>
    </ion-menu>
    <ion-router-outlet id="sideMenu" main></ion-router-outlet>
</ion-split-pane>

<ion-split-pane>
        <ion-menu contentId="sideMenu2" type="overlay">
            <ion-header>
                <ion-toolbar>
                    <ion-title>Side Menu</ion-title>
                </ion-toolbar>
            </ion-header>
            <ion-content>
                <ion-list>
                    <div *ngIf="navigationElement.data">
                        <ion-menu-toggle auto-hide="false" *ngFor="let item of navigationElement.data.sideNavigation">
                            <ion-item>
                                <ion-label>{{item.title}} 2</ion-label>
                            </ion-item>
                        </ion-menu-toggle>
                    </div>
                </ion-list>
            </ion-content>
        </ion-menu>
        <ion-router-outlet id="sideMenu2" main></ion-router-outlet>
    </ion-split-pane>

How are the ion-menu-button in the first component and the ion-menu in the second component are connected? For testing purposes I added a second side menu in the second component. Now only the second toggles and the first is ignored.

Posts: 2

Participants: 2

Read full topic


Camera - saving image

$
0
0

@markedjani wrote:

Why picture taken with camera vary in size depending on location saved.

Using this options to take picture; ( Android )

const options: CameraOptions = {
quality: 70,
destinationType: this.camera.DestinationType.NATIVE_URI,
saveToPhotoAlbum: true,
targetWidth: 1440,
targetHeight: 1440,
correctOrientation: true,
mediaType: this.camera.MediaType.PICTURE
}

image is saved to :
file:///storage/emulated/0/Android/data/io.ionic.testapp/cache/1561638850147.jpg

and it is about 50kb, but image saved to photoalbum ( Pictures folder ) is 1,5 MB !? Why? They look exactly same in quality.

I tought that first image ( cached ) is erased after device restart but it’s not, as I can see only difference is in location, and either i uploaded to server are same quality and JPG format, but not file size.

Posts: 1

Participants: 1

Read full topic

No answer from native plugins

$
0
0

@smith9522 wrote:

hi i moved my code that works well after compile develop from windows 7 pc to windows10. I reproduce the same development configurations, but after compile on windows10 native plugins do not respond ie the camera, imagepiker, documentviewer, TTS etc … what should I do? Thank you in advance.

Posts: 1

Participants: 1

Read full topic

Ionic ion-button in tabs root page not working in tabs pages

$
0
0

@WijiDroid wrote:

I have created an ionic application which have a page that consists of 4 tabs the problem is the base page of the tabs is service-details which has a select box in header and ion-tabs in content. When I trigger the ionChange being inside of the base page it works fine but when I move to a tab and trigger ionChange from the base page it give me error. Here is the service-details.html

 <ion-header>
       <ion-toolbar>
         <ion-buttons slot="start" defaulthref="/service-category">
           <!-- <ion-back-button></ion-back-button>  -->
            <ion-icon name="menu"></ion-icon>
         </ion-buttons>
         <ion-buttons slot="end">
          <ion-icon name="notifications"></ion-icon>
         </ion-buttons>

         <ion-title text-center>Select Services</ion-title>
         </ion-toolbar>

      </ion-header>

      <ion-item class="branch-detail">
       <ion-icon name="pin"></ion-icon>
       <ion-label>You are in</ion-label>
       <ion-select placeholder="" (ionChange)="onBranchChange($event)">
        <ion-select-option  *ngFor="let item of branches;" value=" 
         {{item?.Id}}" (ionChange)="onBranchChange($event)">{{item?.Name}} 
        </ion-select-option>
       </ion-select>
      </ion-item>

      <ion-content>
       <ion-tabs padding-top>
        <ion-tab-bar slot="top">
         <!-- <ion-tab-button tab="packages">
           <ion-label>Packages</ion-label>
           </ion-tab-button> -->

       <ion-tab-button tab="face" >
        <ion-label>Face</ion-label>
       </ion-tab-button>

       <ion-tab-button tab="hair">
        <ion-label>Hair</ion-label>
       </ion-tab-button>

       <ion-tab-button tab="nail">
        <ion-label>Nail</ion-label>
       </ion-tab-button>

      <ion-tab-button tab="body">
        <ion-label>Body</ion-label>
      </ion-tab-button>



      </ion-tab-bar>
     </ion-tabs>
    </ion-content>

Here is the function onBranchChange() in service-details.page.ts

onBranchChange($event){

     this.appointments.BranchId=$event.target.value;

   }

Posts: 1

Participants: 1

Read full topic

SubscribeWithPriority unsubscription in app.component.ts

$
0
0

@AJ.M.A wrote:

The thing is I found a way to unsubscribe a normal subscription in NgOnDestroy but it is not working with subscribeWithPriority.

this.platform.backButton
.pipe(takeUntil(this.ngDestroyed$))
.subscribeWithPriority(0, async () => {}

It returns an error:
Property 'subscribeWithPriority' does not exist on type 'Observable<BackButtonEventDetail>'

Posts: 1

Participants: 1

Read full topic

VPN plugin for IONIC

$
0
0

@revaliati wrote:

Hi ,
I have an application that needs to be connected to the company’s VPN. Today before entering the application we login to the VPN using Palo Alto’s global protect. Is there any way to stop using global protect and connect to VPN through the App? Is there a plugin?

I took a look at the https://github.com/aquto/cordova-plugin-vpn plugin but could not get it to work with IONIC.

Posts: 1

Participants: 1

Read full topic

Loading Controller, dismiss() is called before present() which will keep spinner without dismissing

$
0
0

@sharansirius wrote:

I am using Ionic 4 and trying to implement loadingcontroller as a service and want to use in multiple pages.
I followed the solution provided here. But the solution seem to have hardcoded with the delay of 5000. In realtime that is not an effective way of doing right. Can you please recommend the approach that I have to take to achieve it.

@mhartington @Ben @mattkremer @brandyshea

Posts: 1

Participants: 1

Read full topic

Ionic 3 android app crashes while making payment through razorpay payment gateway

$
0
0

@vinodhoh wrote:

I’ve integrated razorpay payment gateway in my ionic 3 Android app, after filling the details, the app gets crashed before I call the callback method to check whether the payment successful or not. Please suggest

Posts: 1

Participants: 1

Read full topic


Error: resource android:attr/fontVariationSettings not found

$
0
0

@sameershaik wrote:

getting below error while doing initial setup

/home/kalandher.s/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/fe60ba1e2fc433e77557653054dbc233/res/values/values.xml: AAPT: error: resource android:attr/fontVariationSettings not found.
    

/home/kalandher.s/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/fe60ba1e2fc433e77557653054dbc233/res/values/values.xml: AAPT: error: resource android:attr/ttcIndex not found.
    
/home/kalandher.s/Documents/work/trunk/skylark/platforms/android/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:237: error: resource android:attr/fontVariationSettings not found.
/home/kalandher.s/Documents/work/trunk/skylark/platforms/android/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:237: error: resource android:attr/ttcIndex not found.
error: failed linking references.

Failed to execute aapt

com.android.ide.common.process.ProcessException: Failed to execute aapt

below is my properties.gradle file

target=android-26

android.library.reference.1=CordovaLib

cordova.gradle.include.1=cordova-android-support-gradle-release/appname-cordova-android-support-gradle-release.gradle

cordova.system.library.1=com.android.support:support-v4:24.1.1+

cordova.system.library.2=com.android.support:support-v4:+

cordova.system.library.3=com.android.support:support-annotations:27.+

cordova.system.library.4=com.android.support:support-v4:26.+

cordova.system.library.5=com.squareup.okhttp3:okhttp-urlconnection:3.10.0

cordova.system.library.6=com.android.support:appcompat-v7:26.+

cordova.gradle.include.2=cordova-plugin-firebase/appname-build.gradle

cordova.system.library.7=com.google.android.gms:play-services-tagmanager:+

cordova.system.library.8=com.google.firebase:firebase-core:+

cordova.system.library.9=com.google.firebase:firebase-messaging:+

cordova.system.library.10=com.google.firebase:firebase-config:+

cordova.system.library.11=com.google.firebase:firebase-perf:+

gradle version : Gradle 4.4.1

Posts: 1

Participants: 1

Read full topic

InAppBrowser not working in Android as it is in iOS

$
0
0

@mark_bigrock wrote:

Hi

Hopefully, someone can help me.

I have a very simple App using the InAppBrowser plugin. On iOS it works perfectly fine when I touch a button the URL loads using “_blank” and the default navigation is present.

However on Android when I touch a button I just get a blank white screen. I did a test and added a plain link using href tags and that takes me to the URL. Once I have visited the URL via the link the buttons will then work. It is like the URL is blocked from loading when using the buttons.

Button details
home.page.ts - openBlank() {
this.iab.create(‘url.com’, ‘_blank’,{ location: ‘no’});
}

home.page.html - <ion-button class=“button” expand=“block” (click)=“openBlank()”>My Coaching Journey

Link details
home.page.html - < a href=“URL” onclick=“window.open(‘URL’, ‘_blank’, ‘location=no’);”>lINK< /a >

Hopefully this is something simple I am missing.

Thanks

Posts: 1

Participants: 1

Read full topic

Unexpected token. A constructor, method, accessor, or property was expected

Ionic Native Secure Storage Not Working on Android Q

$
0
0

@matthewh12 wrote:

We are having an issue with the Ionic Native Secure Storage plugin. When run on Android 9.+ API 29, an exception is being thrown:

android.content.ActivityNotFoundException: No Activity found to handle Intent { act=com.android.credentials.UNLOCK }

The Secure Storage plugin is a major player in our app. Is anyone else having this issue? Would anyone know of a good fix for this?

Posts: 1

Participants: 1

Read full topic

Crop Image Error

$
0
0

@winkhaing wrote:

when base64 Image crop in ionic 4, show error {“message”:“Image doesn’t not exist”.
How can i solve?

Posts: 1

Participants: 1

Read full topic

Network Error when testing on device with livereload

$
0
0

@obinnae wrote:

This is a case I’ve NEVER seen before, and I’m totally stuck!
I run ionic cordova run android -lc as usual to test it on my device (Samsung Galaxy S4) and get

Application Error
There was a network error (http://localhost:8100/)

Chrome debug just has the following line…

Failed to load resource: the server responded with a status of 404 (Not Found)

This is normal if there’s no Wifi connection, but I’ve confirmed that the connection works fine. I tried on an iPhone and just got a blank screen, with some network-connection-related issues appearing in the log.
If I navigate to localhost:8100 on my browser on the computer, it works.

I even removed and readded teh Android platform and the iOS platform, still the same issue, and config.xml has
<allow-navigation href="*" />

If I run it without livereload, it works fine, but I won’t be able to debug it!

Please help!! This is really urgent and the app is facing launch delays till this is resolved!
Thanks.

Posts: 1

Participants: 1

Read full topic

"export 'ICON_PATHS' was not found in 'ionicons/icons'

$
0
0

@eribur wrote:

Hello! To start off, I’m a beginner. I’ve been trying to fix, but I can’t figure it out… it’s probably something really silly, but here it goes…

Creating a Vue project was smooth, with no errors.
Adding Ionic to that Vue project returns the following warning:

warning in ./node_modules/@ionic/vue/dist/ionic-vue.esm.js
export ‘ICON_PATHS’ was not found in ‘ionicons/icons’

All was well until I added the following to the main.js file:

import Ionic from ‘@ionic/vue’;
import ‘@ionic/core/css/ionic.bundle.css’;

Vue.use(Ionic);

Only when I add the code for Ionic in the main.js file does the error occur. Also note, the Vue ‘Welcome to Your Vue.js App’ template App goes blank.

Any help with this is greatly appreciated. Gratitude

Not sure if you need this, but here’ the package.json:

{
“name”: “zip-info-p”,
“version”: “0.1.0”,
“private”: true,
“scripts”: {
“serve”: “vue-cli-service serve”,
“build”: “vue-cli-service build”,
“lint”: “vue-cli-service lint”
},
“dependencies”: {
@ionic/vue”: “0.0.4”,
“core-js”: “^2.6.5”,
“vue”: “^2.6.10”,
“vue-router”: “^3.0.3”
},
“devDependencies”: {
@vue/cli-plugin-babel”: “^3.8.0”,
@vue/cli-plugin-eslint”: “^3.8.0”,
@vue/cli-service”: “^3.8.0”,
“babel-eslint”: “^10.0.1”,
“eslint”: “^5.16.0”,
“eslint-plugin-vue”: “^5.0.0”,
“vue-template-compiler”: “^2.6.10”
},
“eslintConfig”: {
“root”: true,
“env”: {
“node”: true
},
“extends”: [
“plugin:vue/essential”,
“eslint:recommended”
],
“rules”: {},
“parserOptions”: {
“parser”: “babel-eslint”
}
},
“postcss”: {
“plugins”: {
“autoprefixer”: {}
}
},
“browserslist”: [
“> 1%”,
“last 2 versions”
]
}

Posts: 1

Participants: 1

Read full topic


Can anybody help me install and use mobiscroll in ionic studio?

React-valida-hook-ionic

Capture segment change as observable stream

$
0
0

@Tommertom wrote:

Hi

With FormControl and ION-INPUT one can capture changes using an Observable stream using the valueChanges observable stream. (Ionic v4 - Angular)

Assiging a formcontrol to a select does not seem to work, at least what I tried.

<ion-segment value="all" [formControl]="searchControl">

Anyone have an idea how to subscribe to ion-segment observable stream?

Ideally I don’t want to use ionChange event (can you grab the event as stream?), nor create an BehaviorSubject to create my own stream.

Thanks and regards,

Tom

Posts: 1

Participants: 1

Read full topic

Get the cursor position inside ion-textarea

$
0
0

@mjomdal wrote:

I’m trying to build a basic Rich Text Editor with Ionic, and to do so, I need a way to get the current position of the user’s cursor in the text box. This is for the purpose of bolding text inline. However, I cannot find any property that would let me do this. Does anyone have an idea as to how to do this? Maybe I need to use something other than ion-textarea.

Posts: 1

Participants: 1

Read full topic

Using Ionic4 , angular 7, ng2-charts is not showing chart

$
0
0

@ymphyow wrote:

Hello! I have been following the npm tutorial as link :https://www.npmjs.com/package/ng2-charts.
I tried to test pie chart on home.page : https://stackblitz.com/edit/ng2-charts-pie-template?file=src%2Fapp%2Fapp.component.css.

The error shows below :
TypeError: Object(…) is not a functionng2-charts.js:230:72

If i roll back to ng-charts version 2.2.3 from 2.3.0. The error is like :
Template parse error. Can’t bind ‘data’ since it’s not known of property of ‘canvas’.

I have been trying it for 2 days already. I tried other example too. it down’t work. I am stuck on here . Could you please help me?
Here is my ts file

import { Component,OnInit } from ‘@angular/core’;
import { ChartType, ChartOptions } from ‘chart.js’;
import { SingleDataSet, Label, monkeyPatchChartJsLegend, monkeyPatchChartJsTooltip } from ‘ng2-charts’;
@Component({
selector: ‘app-home’,
templateUrl: ‘home.page.html’,
styleUrls: [‘home.page.scss’],
})
export class HomePage {
// Pie
public pieChartOptions: ChartOptions = {
responsive: true,
};
public pieChartLabels: Label = [[‘Download’, ‘Sales’], [‘In’, ‘Store’, ‘Sales’], ‘Mail Sales’];
public pieChartData: SingleDataSet = [300, 500, 100];
public pieChartType: ChartType = ‘pie’;
public pieChartLegend = true;
public pieChartPlugins = ;
constructor() {
monkeyPatchChartJsTooltip();
monkeyPatchChartJsLegend();
}
ngOnInit() {
}
}

Posts: 1

Participants: 1

Read full topic

Viewing all 70433 articles
Browse latest View live


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