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

Ionic 4 How to pass the data based on the item clicked to the next page?

$
0
0

Ok, it looks like you just need to unwrap your observable.

in your template:

<ion-card *ngIf="wishlistDetail">
<ion-card-title>
{{wishlistDetail.name}}

And in the component:

wishlistService.getWishListByID(wishlistID).subscribe((list) => {
this.wishlistDetail = list;
});

Ionic 4 vs Quasar vs wait for Ionic 5?

$
0
0

Huh, any numbers for that statement:

I looked at quasar, on mobile it deploys to Cordova or capacitor. So the underlying tech is the exact same as Ionic: It renders your website in a webview container.

Performance should depend on the kind of website that you deploy.
Which means that it becomes a comparison between vue, react, etc.
This is independent of Ionic.

You mention :

Ionic does offer a set of web components that are styled to look native. They are compiled with Stencil and compliant with the html standard. Any difficulties here have nothing to do with Ionic, Html is just getting rather complex itself. And in any case, Quasar does the exact same thing : Offer a set of out-of-the-box components that you can use to design your app.

If you don’t want to rely on ion or quasar components, you can just come up with your own styles. The app is a website, you’re free to use any web technology that seems appropriate to you. Bootstrap for example is not compatible with the ion components, but if you just use ‘plain’ html, you can surely deploy it with Ionic.

If you care about maximum performance, you might want to look at stenciljs.

But the performance differences we are talking about here should be mostly a matter of marketing.
If you truly need performance that is not possible with Ionic, you need to think about native code, not another, mostly identical stack of web tech.

About the @ionic-native/http/ngx

$
0
0

i think the reason is how did i send post request. They have a sample by PHP. I test by it. it is ok. But when i coded by ionic. It is CROS

Ionic 4 vs Quasar vs wait for Ionic 5?

$
0
0

Thanks for your thoughts.

Nope, no numbers - completely take your point. It was just my observation having done some playing around with all their component demos.

The underlying tech, a webview is indeed the same, but I believe the performance hit is coming because of webcomponents, NOT because of the framework used to bind to the components, e.g Angular, Vue.

I.e. It’s Ionic’s new ‘fancy’ way of packaging up the components, causing the browsers to render shadow dom, which is then a pain in the ass to modify/impossible unless properties exposed, that causes the performance downgrade. This is my personal observation between Ionic 3 and 4, which I have production apps in both on iOS and Android.

Saying that, it does seem that vue is pretty fast too.

On max performance side - absoutely native agreed. However, that doesn’t addresss the issue of a developer with limited time and resource wanting to pump out an app on both platforms, hence why I also mentioned Flutter, as it has its own rendering engine and from the demos I’ve tried out - including kitchen sink apps - it seems extremely performant.

Can anyone explain why this does/doesn't work ? (Angular child routing)

$
0
0

Hi there,

I was playing with routes and child routes and definetively I think I’m missing the concept.

I have some app(root) routes, and one page with child routes (DashboardPage). The thing is, when I activate one of the child route, this only works the first time. It’s like when I go to any child component I lose the root router.

If I specify the full router path in routerLink property in the DashboardPage.html I can get this working buut, I think this should not be necessary as at that point I’m relative to dashboard state!

I’m getting this behaviour with ionic serve, I think its not platform related.

You can check the sample here

Thanks for your comments !!!

Additional ionic info (just in case):

Ionic:

Ionic CLI : 6.0.1 (/home/sjn/.npm-global/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 4.11.10
@angular-devkit/build-angular : 0.801.3
@angular-devkit/schematics : 8.1.3
@angular/cli : 8.1.3
@ionic/angular-toolkit : 2.1.2

Capacitor:

Capacitor CLI : 1.5.0
@capacitor/core : 1.5.0

Utility:

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

System:

NodeJS : v12.15.0 (/usr/bin/node)
npm : 6.13.7
OS : Linux 4.15

How to close modal/Alert on back button in ionic4 (PWA)

$
0
0

The only Issue I had is that the DeactivateGuard needs to be @Injectable() and in the app.module.ts you need to add the guard inside the providers array… nevertheless it works like a charm, thank you so much

Plugins native error: Object(…) is not a function

$
0
0

The only solution I found so far was to not use the provider.

Inside your constructor, use:

plt.ready().then(platform => {
    this.picker = window['fileChooser'];
})

Now calling this.picker.open() opens the picker.

Pull from ionic repo

$
0
0

Hi,
so I have this old repo that has the latest commits only in the ionic repo for unknown reasons.
I watched https://ionicframework.com/docs/appflow/quickstart/ionic-remote but I’m still not sure.

I want to connect to the ionic git and pull all changes from there to have a fresh working directory again.
So I tried running locally

git clone git@git.ionicjs.com:bla/bla.git --origin=ionic

but got

git@git.ionicjs.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

How do I clone it correctly?


Help us test the Ionic 5 Release Candidate!

$
0
0

Cheers everyone :blush:
I will test the Migration to v5 tomorrow. My App is very very complex, so i am excited to see if it all works.

One Problem i had in v4 and never was fixed: In IOS when i have a list and scroll down, than tap on the status bar while scrolling (which causes a scroll to top), after reaching the top, the contents scrolls down a bit (kind of the rest of scrolling down from before).

@brandyshea - is this fixed in v5? :blush:

[ERROR] ng has unexpectedly closed (exit code 127)

$
0
0

I am getting exit code 127 error.
I tried this but it’s not working for me.
can anyone help to solve this error?

About the @ionic-native/http/ngx

$
0
0

OK then. I’m not going to force you to listen to me.

How To Prevent hardware back button to close ionic Modal

$
0
0

Set a variable to the var. For example let alert = …
alert.dismiss();

Upgrade the existing Ionic 4 app to Ionic 5 and Add New Feature

Nested component not updating view from parent parameter

$
0
0

I am working on a music player app in Ionic V3. I have a sliding player (component) that overlays the content on the screen similar to the Apple Music functionality. The player is a nested component and is rendering correctly. However when selecting a song and passing the name of the song through to the player overlay component, the song is not updating on the screen.

Oddly enough, it is updating in the component.ts file (checked logging and inspecting), it just doesn’t update on the view. I have tried ngZone.run(), but no luck. Any ideas? I’ll provide code below.

Parent Page (content on the screen)

<ion-content class="">
<div ion-fixed class="noScroll">
    <ion-scroll scrollY=true style="height: 100vh">
      <div class="imageContainer">
        <ion-grid>
          <ion-row>
            <ion-col class="songColumn" col-6 *ngFor="let track of recommendedTracksJson">
              <div class="songContainer" (click)="playSong($event, track)">
                <ion-thumbnail item-start>
                  <img class="albumCover" [ngClass]="{'activeTrack': track.active}" [src]="track.album.images[0].url">
                  <div [ngClass]="{'albumOverlay': track.active}">
                     <ion-icon name="pause" *ngIf="track.active" [ngClass]="{'ios-pause-outline': track.active}"></ion-icon>
                   </div>
                </ion-thumbnail>
                <h4 class="trackArtist">{{track.album.artists[0].name}}</h4>
                <p class="trackName">{{track.name}}</p>
              </div>
            </ion-col>
          </ion-row>
        </ion-grid>
      </div>
    </ion-scroll>

    <!-- Music player component -->
    <page-player></page-player>

  </div>
</ion-content>

Inside of playSong func (only providing relevant part of the func)

this.player.setSong(item.name)

Where this.player is the sliding player component that overlays the top of the content

Component setSong() func

setSong(song) {
    this.ngZone.run(() => {
        this.activeSong = song;
    });

    console.log("Active song: " + this.activeSong)
  }

Where the output logs the correct name of the passed in song, but it does not render on the view, the placeholder text remains there.

About the @ionic-native/http/ngx

$
0
0


i follow by this link. Sorry Because i reply late. But my bug is not done :frowning:


Modify shadow-root styles

$
0
0

I want to modify the padding of the item-native class

but the styles are inside swadow-root and when modifying the class:
.item-native{
padding-inline-start: unset;
padding: unset;
}
it is not modified…

I understand that it is a native class of the component, how can I modify it?

Nested component not updating view from parent parameter

$
0
0

Would you mind posting the entirety of the .ts controller files for both the parent and child component? I don’t care about the HTML, but need to see how you are doing the communication in a reproducible way.

Info.plist issue when delivering app for iOS

$
0
0

use config-file tag , example :

<config-file parent="NSCameraUsageDescription" platform="ios" target="*-Info.plist">
 <string>You can take photos</string>
</config-file>

Ion-select-option unable to give any event

$
0
0

Right. Thank you. I will have to look at different approach to get this done. If you have any suggestion let me know.

Ion-select-option unable to give any event

$
0
0

My suggestion is to make a separate “select all” button that lives outside the list of days.

Viewing all 228527 articles
Browse latest View live


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