Quantcast
Channel: Ionic Forum - Latest posts
Viewing all 228535 articles
Browse latest View live

Logout from menu and re-login menu button not working

$
0
0

Hi,

I have an app that is a side menu one. Using Ionic 4

I added a logout button to the side menu and the logout works however when I re-login from the login page I was redirected to when I logged out, the menu button doesn’t work. I can slide the menu using the mouse and then the menu button starts working. If I refresh the page once I have re-logged in then all works fine.

When I have the same logout button and logout function of the home page (right of the menu) then this issue doesn’t happen.

Seems like then the menu is triggering the logout some type of reset is not taking place.

Any ideas?

Thanks
Brent


Background geolocation Crash App only android 9

$
0
0

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

Background geolocation Crash App only android 9

$
0
0

This happen becauseyou are using an old version of this “mauron” plugin. you should use
@mauron85/cordova-plugin-background-geolocation”: “^3.1.0”,

How to solve 'x-frame-options' to 'sameorigin' in ionic4 for Iframe?

$
0
0

Hi, did you find the solution?? i´m dealing with the same problem

Refused to display ' URL/' in a frame because it set 'X-Frame-Options' to 'sameorigin'

How can i update my ionic 3 app to ionic4?

$
0
0

Ionic 3 to 4 is not trivial as I have discovered, there are many differences in how the pages load, lifecycle events, modals interact etc and the syntax too.

It’s simply not worth the effort of trying to do it in place.

Start a new project - bite the bullet and port over the app bit by bit.

For what it’s worth, I think the migration guide provided by Ionic team is misleading and should not be followed.

Logout from menu and re-login menu button not working

$
0
0

Post a gif of what happens - with the console open so we can see any errors that might be being thrown too. Sounds similar to something I had recently, so could possibly help.

But need to see what happens + also potentially some code if it’s not obvious.

How to solve 'x-frame-options' to 'sameorigin' in ionic4 for Iframe?

$
0
0

Have you try with sanitize?
Create a pipe

ng generate pipe safe

import { Pipe, PipeTransform } from '@angular/core';
import { DomSanitizer, SafeHtml, SafeStyle, SafeScript, SafeUrl, SafeResourceUrl } from '@angular/platform-browser';

@Pipe({
  name: 'safe'
})
export class SafePipe implements PipeTransform {

  constructor(protected sanitizer: DomSanitizer) {}
 
 public transform(value: any, type: string): SafeHtml | SafeStyle | SafeScript | SafeUrl | SafeResourceUrl {
    switch (type) {
			case 'html': return this.sanitizer.bypassSecurityTrustHtml(value);
			case 'style': return this.sanitizer.bypassSecurityTrustStyle(value);
			case 'script': return this.sanitizer.bypassSecurityTrustScript(value);
			case 'url': return this.sanitizer.bypassSecurityTrustUrl(value);
			case 'resourceUrl': return this.sanitizer.bypassSecurityTrustResourceUrl(value);
			default: throw new Error(`Invalid safe type specified: ${type}`);
		}
  }
}

and use with you url

<iframe width="100%" height="100%" [src]=" 'https://twitter.com/afdonews'| safe: 'url'" scrolling="no" style="border: 0;" (load)="hideLoading()">
</iframe>

Try this.


How to configure a PWA to run on a subfolder? Ask Question

$
0
0

I had some success with using the angular build command:

ng build --prod --base-href=/myapp/

Still not perfect.

How can i update my ionic 3 app to ionic4?

$
0
0

Ionic 3 to 4 is not trivial as I have discovered, there are many differences in how the pages load, lifecycle events, modals interact etc and the syntax too.

It’s simply not worth the effort of trying to do it in place.

Start a new project - bite the bullet and port over the app bit by bit.

For what it’s worth, I think the migration guide provided by Ionic team is misleading and should not be followed.

Error: cannot access zzbfm

$
0
0

Hello @Kirix
The problem when building the Android application is problems between versions when:

run ionic cordova build android 8.1.0

config.xml

    <platform name="android">
        <preference name="android-minSdkVersion" value="16" />
        <preference default="27.+" name="ANDROID_SUPPORT_V4_VERSION" />
        <framework src="com.android.support:supportv4:$ANDROID_SUPPORT_V4_VERSION" />
        <preference name="loadUrlTimeoutValue" value="700000" />
        <allow-intent href="market:*" />
        ......
    </platform>
    <platform name="ios">
        <preference name="deployment-target" value="9.0" />
        <preference name="pods_use_frameworks" value="true" />
        <pod name="GoogleSignIn" version="4.4.0" />
        <allow-intent href="itms:*" />
         .....
        <edit-config file="*-Info.plist" mode="merge" target="NSCameraUsageDescription">
            <string>Tu carpintero requiere acceder a su cámara.</string>
        </edit-config>
        <edit-config file="*-Info.plist" mode="merge" target="NSMicrophoneUsageDescription">
            <string>Tu carpintero requiere acceder a su micrófono para grabar</string>
        </edit-config>
        <resource-file src="GoogleService-Info.plist" />
    </platform>
    <plugin name="cordova-plugin-whitelist" spec="^1.3.4" />
    <plugin name="cordova-plugin-statusbar" spec="^2.4.3" />
    <plugin name="cordova-plugin-device" spec="^2.0.3" />
    <plugin name="cordova-plugin-splashscreen" spec="^5.0.3" />
    <plugin name="cordova-plugin-ionic-webview" spec="^2.5.3">
        <variable name="ANDROID_SUPPORT_ANNOTATIONS_VERSION" value="27.+" />
    </plugin>
    <plugin name="cordova-plugin-ionic-keyboard" spec="^2.2.0" />
    <plugin name="cordova-plugin-inappbrowser" spec="^3.1.0" />
    <plugin name="cordova-plugin-network-information" spec="^2.0.2" />
    <plugin name="cordova-plugin-x-toast" spec="^2.7.2" />
    <plugin name="cordova-plugin-telerik-imagepicker" spec="^2.3.3">
        <variable name="PHOTO_LIBRARY_USAGE_DESCRIPTION" value="image" />
    </plugin>
    <plugin name="cordova-plugin-compat" spec="^1.2.0" />
    <plugin name="cordova-plugin-media-capture" spec="^3.0.3" />
    <plugin name="cordova-plugin-media" spec="^5.0.3">
        <variable name="KEEP_AVAUDIOSESSION_ALWAYS_ACTIVE" value="NO" />
    </plugin>
    <plugin name="cordova-plugin-nativeaudio" spec="^3.0.9" />
    <plugin name="com-badrit-base64" spec="^0.2.0" />
    <plugin name="cordova-plugin-background-mode" spec="git+https://github.com/katzer/cordova-plugin-background-mode.git" />
    <plugin name="cordova-plugin-camera" spec="^2.4.1">
        <variable name="CAMERA_USAGE_DESCRIPTION" value=" " />
        <variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value=" " />
    </plugin>
    <plugin name="cordova-plugin-cocoapod-support" spec="^1.6.2" />
    <plugin name="cordova-plugin-file" spec="^6.0.2" />
    <plugin name="cordova-plugin-fcm-with-dependecy-updated" spec="^4.1.1" />
</widget>

project.properties ANDROID PLATFORM

# Project target.
target=android-26
android.library.reference.1=CordovaLib
android.library.reference.2=app
cordova.system.library.1=com.android.support:support-v4:24.1.1+
cordova.system.library.2=com.facebook.android:facebook-android-sdk:5.5.2
cordova.system.library.3=com.google.firebase:firebase-core:10.+
cordova.system.library.4=com.google.firebase:firebase-messaging:10.+
cordova.gradle.include.1=cordova-plugin-fcm-with-dependecy-updated/tucarpintero-FCMPlugin.gradle
cordova.system.library.5=com.google.android.gms:play-services-analytics:10.0.0
cordova.system.library.6=com.google.android.gms:play-services-auth:10.0.0
cordova.system.library.7=com.google.android.gms:play-services-identity:10.0.0
cordova.system.library.8=com.android.support:support-annotations:27.+
cordova.system.library.9=com.android.support:appcompat-v7:23+
cordova.gradle.include.2=cordova-plugin-telerik-imagepicker/tucarpintero-ignorelinterrors.gradle
cordova.gradle.include.3=cordova-plugin-telerik-imagepicker/tucarpintero-androidtarget.gradle
cordova.system.library.10=com.android.support:support-v4:28.+
cordova.system.library.11=com.android.support:appcompat-v7:28.+

Template TABS (No component factory found for HelloworldPageModule)

$
0
0

Hello all, im trying ionic for the first time.
I created a project using the template TABS and im trying to add a new page with new botton in the bottom menu.
I did this:

  1. ionic generate page helloworld

  2. In tabs-routing.module.ts i added the new route:
const routes: Routes = [
    {
        path: 'tabs',
        component: TabsPage,
        children: [
            {
                path: 'home',
                children: [
                    {
                        path: '',
                        loadChildren: () => import('../helloworld/helloworld.module').then(m => m.HelloworldPageModule)
                    }
                ]
            },
            {
                path: 'tab1',
                children: [
                    {
                        path: '',
                        loadChildren: () => import('../tab1/tab1.module').then(m => m.Tab1PageModule)
                    }
                ]
            },
            {
                path: 'tab2',
                children: [
                    {
                        path: '',
                        loadChildren: () => import('../tab2/tab2.module').then(m => m.Tab2PageModule)
                    }
                ]
            },
            {
                path: 'tab3',
                children: [
                    {
                        path: '',
                        loadChildren: () => import('../tab3/tab3.module').then(m => m.Tab3PageModule)
                    }
                ]
            },
            {
                path: '',
                redirectTo: '/tabs/home',
                pathMatch: 'full'
            }
        ]
    },
    {
        path: '',
        redirectTo: '/tabs/home',
        pathMatch: 'full'
    }
];

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

tabs.page.html

<ion-tab-button tab="home">
      <ion-icon name="home"></ion-icon>
      <ion-label>Home</ion-label>
    </ion-tab-button>

But this is the error:

Could not find method compile() for arguments [com.android.support:recyclerview-v7:25.3.1]

$
0
0

hi,

In my android studio build gradle is failed i dont know how so then i check the log and i saw this error Error:Could not find method compile() for arguments [com.android.support:recyclerview-v7:25.3.1] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

Please install the Android Support Repository from the Android SDK Manager. Open Android SDK Manager

then i check it but android support respository is already installed version 47.0.0 i restart android studio but it shows same error how i solve this error from android studio please help me to solve this problem?

How to configure a PWA to run on a subfolder? Ask Question

$
0
0

I think editing angular.json is a more sustainable way of doing this.

Form updating with wrong data

$
0
0

I don’t mean to sound glib here, but this is probably the most commonly asked question on these forums by a factor of 3, and I don’t think I’ve ever yet seen a situation where it was really the question the poster actually wanted answered, once all was said and done.

So can you post enough code for somebody to be able to reproduce the behavior you’re concerned about, along with:

  • an explanation of steps to take: enter “blahblah” in email field, press “submit”, etc.,
  • what is supposed to happen after those steps
  • what actually happens
  • what’s important about how those last two differ

Ionic cordova build android throw an error

$
0
0

Download Gradle and move files to to C:\Gradle.
And set environment variable

I recommend use jdk1.8.0_201.

Missing SDK.

C:\Users\YOU_USER\AppData\Local\Android\Sdk

And in your Path system variable.
You need.

%JAVA_HOME%\bin
%ANDROID_HOME%\platform-tools
%ANDROID_HOME%\platforms

And in you User variable path.

C:\Gradle\bin

Firebase Push Notifications tutorial for Ionic V1

Error after installation 'call number plugin'

$
0
0

This is the exact text of the error? That’s the direction the slashes go, and it says “projectname” where you put “projectname”?

Template TABS (No component factory found for HelloworldPageModule)

$
0
0

I dont know. But i deleted this page, and stopped the server, i did again all like before, and now work.

Template TABS (No component factory found for HelloworldPageModule)

$
0
0

Try import you module and use router by

import { HelloworldPageModule} from ‘…/helloworld/helloworld.module’; // import correctly you module


{ path: '', loadChildren: () => HelloworldPageModule }

stop and restart you ionic serve.

Viewing all 228535 articles
Browse latest View live


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