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

Ionic 4 Hide/Show Header Directive Animation LAGS while scrolling

$
0
0

@mhoxha wrote:

Hello everyone, I hope you all doing well :smiley: ,

I have been looking and searching for a good way to hide and show header on ionic 4 project while scrolling.
I have achieved that by the help of others on form and by doing some search, but what I am having issue now is that it is so laggy, like it flickrs and something like that when it hides/shows.

For this i have used a directive.
Here is my ionic info:

Ionic:

   Ionic CLI                     : 5.4.9 (C:\Users\Milot\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework               : @ionic/angular 4.9.1
   @angular-devkit/build-angular : 0.803.23
   @angular-devkit/schematics    : 8.1.3
   @angular/cli                  : 8.1.3
   @ionic/angular-toolkit        : 2.0.0

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 8.1.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 10 other plugins)

Utility:

   cordova-res : 0.8.1 (update available: 0.9.0)
   native-run  : 0.2.9 (update available: 0.3.0)

System:

   Android SDK Tools : 26.1.1 (C:\Users\Milot\AppData\Local\Android\Sdk)
   NodeJS            : v13.2.0 (C:\Program Files\nodejs\node.exe)
   npm               : 6.13.1
   OS                : Windows 10

And this is how i have used the directive:

import { Directive, Input, ElementRef, Renderer2, OnInit } from "@angular/core";
import { DomController } from "@ionic/angular";
​
@Directive({
  selector: "[myScrollVanish]"
})
export class ScrollVanishDirective implements OnInit {
  @Input("myScrollVanish") scrollArea;
​
  private hidden: boolean = false;
  private triggerDistance: number = 1;
​
  constructor(
    private element: ElementRef,
    private renderer: Renderer2,
    private domCtrl: DomController
  ) {}
​
  ngOnInit() {
    this.initStyles();
​
    this.scrollArea.ionScroll.subscribe(scrollEvent => {
      let delta = scrollEvent.detail.deltaY;
​
      if (scrollEvent.detail.currentY === 0 && this.hidden) {
        this.show();
      } else if (!this.hidden && delta > this.triggerDistance) {
        this.hide();
      } else if (this.hidden && delta < -this.triggerDistance) {
        this.show();
      }
    });
  }
​
  initStyles() {
    this.domCtrl.write(() => {
      this.renderer.setStyle(
        this.element.nativeElement,
        "transition",
        "0.1s linear"
      );
      this.renderer.setStyle(this.element.nativeElement, "height", "52px");
    });
  }
​
  hide() {
    this.domCtrl.write(() => {
    //   this.renderer.setStyle(this.element.nativeElement, "min-height", "0px");
      this.renderer.setStyle(this.element.nativeElement, "height", "0px");
    //   this.renderer.setStyle(this.element.nativeElement, "opacity", "0");
    //   this.renderer.setStyle(this.element.nativeElement, "padding", "0");
    });
​
    this.hidden = true;
  }
​
  show() {
    this.domCtrl.write(() => {
      this.renderer.setStyle(this.element.nativeElement, "height", "52px");
    //   this.renderer.removeStyle(this.element.nativeElement, "opacity");
    //   this.renderer.removeStyle(this.element.nativeElement, "min-height");
    //   this.renderer.removeStyle(this.element.nativeElement, "padding");
    });
​
    this.hidden = false;
  }
}

html file:

<ion-header>
  <ion-toolbar [myScrollVanish]="scrollArea">
  </ion-toolbar >
</ion-header>
<ion-content #scrollArea scrollEvents="true"> ... </ion-content>

and here is a video of it, first time its with 0.1s linear and second time is with 0.5s linear:
Click here for Stramable Video

i have tried these but with same results:
Link 1
Link 2
Link 3

thank you very much,

All the best,

Milot.

Posts: 1

Participants: 1

Read full topic


Ionic4 - Cannot find module - $_lazy_route_resource lazy namespace

xCode 7.3 and IONIC

$
0
0

@marcinni2 wrote:

Hello,

I am not used to Apple Products, I am trying to develop IOS app from my IONIC project (I managed to do it succesfully on Android) - using my friend’s MAC. It is not the latest version, that’s why I installed xCode 7.3.

I saw the info in the documentation that I need xCode 10. Does it mean that I have no chance to open projext in xCode? I did everything:

  • ng build --prod
  • ionic sync ios

So I have my IOS folder, I am trying to open my project in xCode, but I have the information: “File could not be opened”.

Anyone knows if there is some way to do it with not the latest version of MAC? I thought that developing on IOS is easier - I’ve never been Apple product user and it doesn’t convince me :grin: - thanks for any help!

Cheers!

Posts: 1

Participants: 1

Read full topic

ngClass not working on Ionic 4

$
0
0

@adrosutal wrote:

Hi, I’m testing ngClass in a project, so that an ion-item changes color based on a numeric value, this is the HTML code

<ng-container *ngFor="let player of team1">
  <ion-item [ngClass]="{'rBG': player.Susp > 0}">
    <ion-label slot="start" (click)="presentAlert()">{{player.Name}} {{player.Surn1}} {{player.Surn2}} {{player.Num}}</ion-label>
    <ion-checkbox slot="end"></ion-checkbox>
  </ion-item>
</ng-container>

Here is my SCSS code:

.rGB{
    color: red;
 }

player.Susp holds a numeric value obtained from a database

Posts: 1

Participants: 1

Read full topic

Trying to update to iOS 5, get errors in build

$
0
0

@helpmelearn wrote:

Was trying to build my old way and got error.

(node:1923) UnhandledPromiseRejectionWarning: TypeError: Cannot read property ‘toLowerCase’ of undefined

I need to updated my iOS to 5 or 5.1. As I’m adding this platform ionic tries to install all my plugins. Getting these errors.

Installing “cordova-plugin-device” for ios
Failed to install ‘cordova-plugin-device’: Error: Cannot find module ‘glob’

Installing “cordova-plugin-whitelist” for ios
Failed to install ‘cordova-plugin-whitelist’: Error: Cannot find module ‘./src/superspawn’

Tried ionic cordova prepare ios similar errors installing plugins.

I think I need to upgrade some other items. I’m still kind of stuck on Ionic 3. Here is my ionic info.
Again I have just tried to add iOS 5.1 has build problems was on ionic iOS 4.5.5.

What should I try next?

cli packages: (/Users/dev/.npm-packages/lib/node_modules)

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 8.0.0 

local packages:

@ionic/app-scripts : 3.2.4
Cordova Platforms  : ios 5.1.1
Ionic Framework    : ionic-angular 3.9.2

System:

ios-deploy : 1.9.2 
Node       : v8.10.0
npm        : 5.8.0 
OS         : macOS
Xcode      : Xcode 11.3.1 Build version 11C504 

Environment Variables:

ANDROID_HOME : not set

Misc:

backend : pro

Posts: 1

Participants: 1

Read full topic

Login Integration with ForgeRock for Mobile App

$
0
0

@thirugnanam wrote:

We are trying to integrate ionic 4 with ForgeRock for login authentication. We are trying to use ForgeRock Javascript SDK. I would like to know if there are any any existing challenges before start using them. Appreciate your response.

Posts: 1

Participants: 1

Read full topic

It's a nightmare to maintain an ionic app

$
0
0

@torger wrote:

Why is backwards compatibility broken ALL THE TIME? I’m maintaining an app that was built with ionic-v1. Lots and lots of things have broken and been deprecated in just a few years. Strong recommendation to move to capacitor for unclear reason other than breaking compatibility. Surprise, capacitor requires typescript which is not supported in ionic-v1.

It’s pretty obvious to me that those that develop Ionic has NO INTEREST whatsoever in making an app easy to maintain over the years. And with constant launching of new versions with compatibility breaks and new best practices it’s almost impossible to find useful docs in forums, as it’s so fragmented between the versions.

Sorry for the language, but I’m just so incredibly frustrated when I’m spending days to just get stuff to work, with NO real code change whatsoever to the app, I just want it to build with an up to date toolchain.

Making apps with web technology is supposed to be easy. And it is. If you follow the current tutorial. But if you get back three months later, that tutorial looks different, and if your app was based on the old tutorial, you’re f****d. It’s like as if this framework is made for people that make apps that take one month to develop and has a life cycle of three months before it’s thrown away.

I make apps that have life time that spans many years, and they don’t need that much functional update. Is that use case really that unique that you need to make migration a living h*ll?

Posts: 1

Participants: 1

Read full topic

Issue with ionDrag listener

$
0
0

@IrekJanek wrote:

Angular v 8.1.2 & ionic v 5.4.16

I am trying to listen for ion-item-sliding ionDrag event but the event never fires and when I go to check the listeners on my IonItemSliding the ionDrag is not listed. Any ideas?

Posts: 1

Participants: 1

Read full topic


Can not create new project in ionic 5 in windows

$
0
0

@alitalaee wrote:

Hi Team,

I’m new to Ionic and tried creating an application using the below command

C:\Windows\System32>ionic start myFirstApp --type=“angular” blank

I’ve the below erro

Capture

please Help me

Posts: 1

Participants: 1

Read full topic

Ionic 4 - New Starter Help

$
0
0

@RobHowdle wrote:

Hi everyone, I’m new to Ionic and Angular so please forgive any stupid questions.

I am attempting to learn this framework and I’m building a random app purely to see how I’m doing it in. I seem to be struggling with the most basic stuff though, watching youtube tutorials on Ionic 4 and Angular JS, everything seems right or at least the same as what the people in the tutorials have yet mine has elements that don’t work.

For example I cannot get a menu to work, I can get a split plane and display a menu on the first page but something like toggling a menu on any other page or even displaying the menu on another page doesn’t work.

I’m not sure if perhaps my layout of the html pages are incorrect, I’m at looking at this similar to a normal HTML project which could be wrong but I didn’t find anything on actually structuring the front end page. I’ve included my menu page below which ideally I’m hoping to have some tabs that link to pages, there would only be a few but even then I’m open to suggestions.

The issue with just this part for example is the title, I would expect this to resize between a desktop and a mobile device (I’m running in a browser and ionic lab to simulate ios and android) but it seems to have no form of mobile responsiveness at all?

AGain I could totally be wrong and end up doing something completely wrong and I’m hoping somebody could point me in the right direction because so far the tutorials haven’t been much help and the documentation doesn’t seem to answer my questions, or simply I just don’t get it…

<ion-buttons slot="start">

  <ion-menu-button></ion-menu-button>

</ion-buttons>

<ion-title>

  <h1 class="title">

  Mr B's Droid Checklist

  </h1>

</ion-title>
<ion-tab-bar slot="top" has-header="true">

  <ion-tab-button tab="astromechs">

    <ion-icon name="person"></ion-icon>

  </ion-tab-button>

  <ion-tab-button tab="d0">

    <ion-icon name="call"></ion-icon>

  </ion-tab-button>

  <ion-tab-button tab="bd1">

    <ion-icon name="settings"></ion-icon>

  </ion-tab-button>

  <ion-tab-button tab="bt1">

    <ion-icon name="settings"></ion-icon>

  </ion-tab-button>

</ion-tab-bar>

Any suggestions would be greatly appriciated

Thanks
Rob

Posts: 1

Participants: 1

Read full topic

Localhost:8100 could not be loaded because net::ERR_CLEARTEXT_NOT_PERMITTED

$
0
0

@ashleylaverick1 wrote:

So… I am looking to run my Ionic 5 (Angular, Capacitor) app on Android Emulator.

Hence, I do:

ionic build

ionic cap run android

Once in Android Studio, I choose a virtual device and click the Play button.

As the app loads, a toast appears with:

“Using app server http://localhost:8100”.

And then once it has “loaded”, all that happens is an error:

“Webpage not available… The webpage http://localhost:8100/ could not be loaded because: net::ERR_CLEARTEXT_NOT_PERMITTED”

To be honest, I have no idea what the error message means, nor do I know for sure if I am following the right steps to run the app, but I would appreciate any help on this before I put my head through the incredibly thin walls of my uni flat.

Thanks

Posts: 1

Participants: 1

Read full topic

No Icon is showing Up in my app

$
0
0

@Xerxix wrote:

I have an App, and when I build the app no icon is showing and I am not sure what could be the solution.
what could be the possible solution !!
Need you help guys.

Posts: 1

Participants: 1

Read full topic

Carrusel se ejecuta sólo en el home, no funciona en paginas internas

$
0
0

@tmoksilva wrote:

Hola, estoy usando un archivo en javascript para integrar un carrusel en mi aplicación, cuando se carga la app en el home funciona sin problema, pero si paso a otra página usando el routerLink, no carga el mismo slider.

Pareciera que como ya cargó la primera vez el archivo js en el home al pasar a la otra página ya no detecta el slider. Si yo recargo esa página en donde no se ve. Si carga el slider sin problema.

La idea es no recargar la página para ver el carrusel.

Alguna idea???

Posts: 1

Participants: 1

Read full topic

Ionic4 webapp - not hitting breakpoint debugging in chrome

$
0
0

@halbertn wrote:

Hello,
I’m having problems hitting my breakpoints in an ionic v4 webapp when debugging it using Chrome’s developer tools. After I first launch the app by running ‘ionic serve’, I am able to set and hit breakpoints in my code. However, if I modify that code and utilize Live reload to re-compile and reload the Chrome browser, I will no longer break into that code. The changes are reflected in the webapp, and the debugger is showing the new code, so I know that live reload is working. However, my breakpoints set in that code no longer work. I must kill and rerun ‘ionic serve’ to be able to break into the code.

To setup debugging, I have added "sourceMap":true under the compilerOptions in tsconfig.json

Thank you for your help

PS. one work around is to use the debugger statement in javascript. I can update my code, add a debugger statement, and during the execution of that code, chrome will break at that statement.

Posts: 1

Participants: 1

Read full topic

Ionic 5: input focus scroll assist on iOS broken

$
0
0

@informatik_tirol wrote:

Hi. Input focus scroll assist on iOS is borken since IONIC version 4.9.
Here the issue on github: https://github.com/ionic-team/ionic/issues/19589
I created a new project with 5.0.4, input focus scroll assist does not work as well.
Here you can find a video an source code: https://github.com/ionic-team/ionic/issues/19589#issuecomment-596056410

Has anyone of you brought that up and running with scroll assist? For me it is not usable without scroll assist, i have to use IONIC 4.8.1 until the bug gets resolved…

THX

Posts: 1

Participants: 1

Read full topic


Join request in firestore

$
0
0

@barrymamadoukorka wrote:

I have zone problème un firestore . i want to do a join from to collection like.
this.afs.collection(“users”).joint(“comment”) can you help me please ?

Posts: 1

Participants: 1

Read full topic

Ion-infinite-scroll not working properly in ionic 4

Problems with dependencies in the gradle sync. Admob and FCM

$
0
0

@LucasEz wrote:

Hi, How can i solve this problem?

this happened after adding FCM and ABmob to my project

Error:

Gradle sync failed: In project ‘app’ a resolved Google Play services library dependency depends on another at an exact version (e.g. “[11.0.
4]”, but isn’t being resolved to that version. Behavior exhibited by the library will be unknown.
Dependency failing: com.google.android.gms:play-services-clearcut:11.0.4 -> com.google.android.gms:play-services-tasks@[
11.0.4], but play-services-tasks version was 16.0.1.
The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
ifact with the issue.
– Project ‘app’ depends onto com.google.firebase:firebase-common@{strictly 17.0.0}
– Project ‘app’ depends onto com.google.android.gms:play-services-tasks@{strictly 16.0.1}
– Project ‘app’ depends onto com.google.firebase:firebase-iid@{strictly 18.0.0}
– Project ‘app’ depends onto com.google.android.gms:play-services-ads@{strictly 11.0.4}
– Project ‘app’ depends onto com.google.android.gms:play-services-safetynet@{strictl… (show balloon)

Posts: 1

Participants: 1

Read full topic

Intallation went wrong?

$
0
0

@MrMike wrote:

When starting a project with “ionic start” I see some error messages (Warnings actually) most of them are about skipping optional dependencies:

Even some of them mention to install them manually
https://pastebin.com/UVpnTniJ

But a few of them seem more important as they mention deprecated libraries.

npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142

Right after that I see a line that says

> core-js@3.6.4 postinstall C:\Personal\Ionic\themappr\node_modules\@angular-devkit\build-angular\node_modules\core-js
> node -e "try{require('./postinstall')}catch(e){}"

Why it says 3.6.4 there? Does that means it updated itself or what?

And finally during the installation I also see errors (warnings) like this.

> git.exe init
Initialized empty Git repository in C:/Personal/Ionic/themappr/.git/
> git.exe add -A
warning: LF will be replaced by CRLF in .gitignore.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in angular.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in browserslist.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in capacitor.config.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in e2e/protractor.conf.js.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in e2e/src/app.e2e-spec.ts.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in e2e/src/app.po.ts.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in e2e/tsconfig.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in ionic.config.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in karma.conf.js.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in package-lock.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in package.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/app/app-routing.module.ts.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/app/app.component.html.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/app/app.component.spec.ts.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/app/app.component.ts.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/app/app.module.ts.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/app/home/home.module.ts.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/app/home/home.page.html.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/app/home/home.page.scss.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/app/home/home.page.spec.ts.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/app/home/home.page.ts.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/assets/shapes.svg.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/environments/environment.prod.ts.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/environments/environment.ts.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/global.scss.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/index.html.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/main.ts.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/polyfills.ts.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/test.ts.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/theme/variables.scss.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/zone-flags.ts.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in tsconfig.app.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in tsconfig.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in tsconfig.spec.json.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in tslint.json.
The file will have its original line endings in your working directory

Is this how a normal installation goes, or something is completely broken here?

Posts: 1

Participants: 1

Read full topic

Ionic5 - ionic cordova run android is not working for me

$
0
0

@Sweg wrote:

I created a new ionic 5 app, & am trying to run it on my android device.

I installed this platform: ionic cordova platform add android:6.4, & then ran ionic cordova run android.

But I get this error message:

myErr

Also, here are my system variables:

![vara|690x381](upload://zXj0gqcSf3zTr8mZwLOZUk30hl1.png) 

Can someone please tell me what is causing this issue, & how can I resolve it?

Posts: 1

Participants: 1

Read full topic

Viewing all 70424 articles
Browse latest View live


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