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

Rahul Sharma in Manchester, UK

$
0
0

Hi All

I hope you all are okey,

First, I want to Introduce mySelf.

I am new here. I am a Business Man in Manchester, UK i Join this forum to get more Knowledge and increase my decision making skills.

And Second i Want to Know that,

How to post Multipart Data in Native http Post.?


Ionic 5 after internet connects reload current page

$
0
0

i am using https://github.com/apache/cordova-plugin-network-information.

once internet connected back, imges are broken still. how to load those after connectivity?

 this.network.onConnect().subscribe(() => {
      console.log('network connected');
      // reload current page
      this.networkState.next(false);
    }, error => console.error('Error while connecting', error));

InAppBrowser loadstart not firing in ionic 4

$
0
0

Updating plugins to newer versions solved this to me. You will need to actually remove existing ones and re-add them.

Here’s what I did:

  1. Removed the plugins from the plugins folder.
  2. I examined package.json and researched for latest and modified versions.
  3. I also had to ensure that the were listed in the config.xml (latest version)
  4. (Build it with) ionic cordova prepare ios.

Specifically for me I was using the xcode ios simulator and as I understand this may have to do with removing UIWebView calls and replacing them with WKWebView. UIWebView is now deprecated.

Heres a snippet from the bottom of my config.xml:







Could not load content for node_modules/@ionic/angular/src/css/text-alignment.scss

Using Quill Text Editor in Ionic

$
0
0

Have anyone here ever used Quill Text Editor in Ionic? (https://quilljs.com/docs/quickstart/)

The question arise because currently I am trying to implement it on my Ionic App but somewhow the interface is broken. So I am wondering if it is because does not support Ionic or something else.

Action required: Update your Android targetSdkVersion by Nov 2, 2020

$
0
0
  1. add android platform like this:

ionic cordova platform add android

  1. after downloaded android platform go to:
    Platforms --> android --> build.gradle then go to the bottom of the build.gradle page, and you will find something like this:
project.ext {
          defaultBuildToolsVersion="28.0.3" //String
          defaultMinSdkVersion=19 //Integer - Minimum requirement is Android 4.4
          defaultTargetSdkVersion=28 //Integer - We ALWAYS target the latest by default
         defaultCompileSdkVersion=28 //Integer - We ALWAYS compile with the latest by default
    }
  1. change the code:
project.ext {
          defaultBuildToolsVersion="29" //String
          defaultMinSdkVersion=19 //Integer - Minimum requirement is Android 4.4
          defaultTargetSdkVersion=29 //Integer - We ALWAYS target the latest by default
         defaultCompileSdkVersion=29 //Integer - We ALWAYS compile with the latest by default
    }

then build your android.

Ionic 5 - Ion-button click doesn't always trigger on Android tablet

$
0
0

@tonyawad88 Finally, what did you find with the Debug in the Chrome DevTools?

Ionic Side Menu being displayed even if it is not mentioned

$
0
0

Dear @vaa There is a way to get the ID since you get the instance of the first Menu.
With the Menu, when you go to execute any function (e.g. close()); you pass that specific id.

I hope this description is useful for you.


Ionic 5 - Ion-button click doesn't always trigger on Android tablet

$
0
0

@tonyawad88 add mod=“md” in your button for example:

<ion-button color="primary" mode="md">Primary</ion-button>

:slightly_smiling_face:

Ionic 5 & Phaser 3

$
0
0

I think I was able to solve this after some experimenting and researching.

Once you have generated your project and run npm i phaser, you have to add a line to the scripts array in angular.json

"scripts": [
    "node_modules/phaser/dist/phaser.min.js"
]

then you need to modify your tsconfig.json file to include the ScriptHost library

"lib": [
    "es2018",
    "dom",
    "scripthost" //add this
],

then the final addition should be to add a line at the very end of the polyfills.ts file to avoid an ActiveX bug

/***************************************************************************************************
 * APPLICATION IMPORTS
 */
(window as any)['global'] = window;

with these changes implemented i was able to get Phaser 3 working with Ionic! Let me know if this works!

How to align the img to center

$
0
0

In my case I used ion-grid and ion-img to center the image.

<ion-grid>
    <ion-row>
        <ion-col size="4" offset="4">
          <ion-img [src]="assets/logo" alt="logo-image"></ion-img>
        </ion-col>
   </ion-row>
</ion-grid>

You can change your code to

<ion-content padding class="myphoto">
 <ion-grid>
    <ion-row>
        <ion-col size="4" offset="4">
          <img src="{{imgSrc}}" id="imgPlacement">
        </ion-col>
  </ion-row>
...
</ion-grid>
</ion-content>

Not allowed to load local resource: file?

$
0
0

I also have the same problem and not working on iOS platform.

BEST chat app for Ionic 5

$
0
0

Hi!

Any suggestion? I am looking for a complete and easy to integrate chat plugin for my Ionic/Angular app.

Thanks in advance!

Events Broadcasting in ionic5

$
0
0

I wish I knew more about what “does some UI stuff” means, but here’s the fundamental design problem I see here:

I spoke earlier about bugs living in crevices. If responsibility is clearly isolated, then a) we know what has to be tested, b) if something goes wrong, we know where to look, and c) it’s harder to break existing functionality by extension.

Your situation is not too dissimilar to the one that soured me completely on Ionic Events, and, frankly, hardened my resolve about getting rid of imperative thinking in web apps.

I had a toolbar, like the kind you see in modern office suite software. It contained a refresh button. When you clicked on the refresh button, whatever the main content pane was was supposed to go get the most up-to-date version of whatever data it was displaying.

This eventually became completely unwieldy. Some pages didn’t really have anything to refresh, which meant we had this button that didn’t always work. There isn’t any way to test whether an unrelated page is responding to such calls for action at a distance, so new pages would get added and there would be an omission or mistake in wiring up the refresh functionality. Some pages were specifically designed to look at a logically-consistent snapshot of information coming from many different sources, that the page itself wasn’t even always aware of. There isn’t any possible way for the page to even know what’s refreshable, let alone try to refresh it.

Furthermore, one thing that both Apple and Google agree on when it comes to UI design is that sidebars are for navigation - users expect them to provide ways of changing what the main pane is, not drilling down into making the main pane do X or Y.

staticinjectorerror(platform core) e nullinjectorerror no provider for e (After being deployed in firebase)

$
0
0

Ionic app was working perfectly well locally, when I deployed to firebase it keeps showing a white screen. I inspect the page and I found Uncaught NullInjectorError: StaticInjectorError(s)[s -> e]:
StaticInjectorError(Platform: core)[s -> e]:
NullInjectorError: No provider for e!
on the console.

Git Repo = > https://github.com/lewisuzoma/myApp.git
Please, I need anyone’s help.

######CLI INFO

   Ionic Framework               : @ionic/angular 5.0.7
   @angular-devkit/build-angular : 0.803.26
   @angular-devkit/schematics    : 8.3.26
   @angular/cli                  : 8.3.26
   @ionic/angular-toolkit        : 2.2.0

Utility:

   cordova-res : not installed
   native-run  : not installed

System:

   NodeJS : v13.13.0
   npm    : 6.14.8
   OS     : Windows 7```

Ionic React : Switching between tabs is very slow since I added Ionic

$
0
0

I just added Ionic to my existing React app and, then, impleted the @ionic/react-router.

But after to modify my navigation tabs, I notice a BIG difference of delay when I switch between two tabs :

  • 0.5 seconds with ReactRouter :white_check_mark:
  • 2 seconds with IonicReactRouter :sob:
<IonTabs>
  <IonRouterOutlet animated={false}>      
    <Redirect exact path="/tab" to="/tab/home" />
    <Route exact path={`/tab/home`} render={() => <Home />} />
    <Route exact path={`/tab/user`} render={() => <User />} />
    <Route exact path={`/tab/ranking`} render={() => <Ranking />} />
    <Route exact path={`/tab/settings`} render={() => <Settings />} />
  </IonRouterOutlet>

<IonTabBar slot="bottom">
  <IonTabButton tab="home" href="/tab/home">
    <IonIcon className='icon icon-home' />
    <IonLabel>Home</IonLabel>
  </IonTabButton>
  <IonTabButton tab="user" href={`/tab/user`}>
    <IonIcon className='icon icon-team' />
    <IonLabel>Club</IonLabel>
  </IonTabButton>
  <IonTabButton tab="ranking" href={`/tab/ranking`}>
    <IonIcon className='icon icon-ribbon' />
    <IonLabel>Phases</IonLabel>
  </IonTabButton>
  <IonTabButton tab="settings" href={`/tab/settings`}>
    <IonIcon className='icon icon-ranking' />
    <IonLabel>Ranking</IonLabel>
  </IonTabButton>
</IonTabBar>

I notice, if I remove all content from my tabs, the “switch time” is Ok, but I don’t want empty tabs :confused:

<IonRouterOutlet >      
  <Route exact path={`/tab/home`} render={() => <IonPage>Home is empty</IonPage>} />
  ...

Do I made a mistake ?

PS : Of course I can optimize my tab content, but this is not explains why it is more slow than the react BrowserRouter

Command line not working

Events Broadcasting in ionic5

$
0
0

I agree on the Apple and Google standpoint. But, in my case I want to really need to modify the state of main view to make an important user action in the app readily accessible. The menu shows only for this view so your one panel, multiple view situation is not happening. However, maybe the menu should be moved into the MainView.html instead of being in app.components.html ?

I meanwhile reimplemented my own event handler for this last night

import { Injectable } from '@angular/core';
import { Subject, Observable } from 'rxjs';

@Injectable({
    providedIn: 'root'
})
export class EventsService {

    static subject = new Subject<any>();

    static sendMessage(text){
        EventsService.subject.next(text);
    }

    static getMessage(): Observable<any>{
        return EventsService.subject.asObservable();
    }
}

staticinjectorerror(platform core) e nullinjectorerror no provider for e (After being deployed in firebase)

$
0
0

Thank you for providing the repo.

I see a page with a plus sign FAB and one of several dots near the bottom. I have to scroll down to see a “NEXT” button that is partially obscured by the border of what appears to be a card.

I click the “NEXT” button. Nothing happens. I see an exception in the JavaScript console telling me that the swipeNext function that is attempting to be called by the click handler on the button refers to a method that does not exist.

Events Broadcasting in ionic5

$
0
0

If we agree that sidebar menus should be used for navigation, to determine which page is current, then I would look for someplace other than a sidebar menu to put this feature.

I don’t get the sense I’m going to convince you, here, though, and that’s OK.

Viewing all 230107 articles
Browse latest View live


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