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

Ionic Align Avatar On Top

$
0
0

Have added html now, there is no css changes have been done for this page on my app.


How to show comment replies in descending order based on time

$
0
0

Unfortunately this is the Third Forum I am requesting the suggestion.

Question in short:

What is the best way to show comments in ionic2, especially when it has replies. I need to show replies based on their time.

++++++++++++++++++++++++++++++

Question in detail:

I have the below data with me in json format.

This is the list of comments. In this example 19 comments are there under items tag.

http://www.jsoneditoronline.org/?id=47b282c498505ed25869dc36f5f3bd58

Comments are already sorted based on Date published.

Now on the Item Id 10th there are two replies to this comment.

I am looking for a way to order this reply based on publishedAt time.

Below is my html: Here videoComments = the json data specified above

I tried using angualr-pipes orderBy pipe but that did not work for me, is there any alternative way?

<ion-list>
  <ion-item *ngFor="let comment of videoComments">
    <!-- here i Print the details what is required , next if there are any reply i would like to show them-->
    <div *ngIf="comment.snippet.totalReplyCount != 0">
      <ion-list>
        <ion-item *ngFor="let reply of comment.replies.comments | orderBy: 'publishedAt'">
          <!-- Above orderBy pipe is not working , may be my syntax is wrong -->
           <!-- I would like to show replies in ascending order of when it was submitted-->
          <!-- Details of replies will be shown here -->
        </ion-item>
      </ion-list>
    </div>
  </ion-item>
</ion-list>

Images not shown on Android tablet

$
0
0

ok I tried this:

    this.http.get('/assets/www/assets/JSON/ingredients_exhibition.json')

and this

imageUrl: '/assets/www/assets//img/0.jpg'

but it hasn't fixed it, so either the path is wrong, or that's not the cause..

Audio in browser

$
0
0

Ionic Native is a wrapper for Cordova. That means Ionic Native only works when Cordova is present. browser is one of the platforms that come with Cordova, but is not really thought to be used by Ionic - but there is nothing to prevent you, that's why I said "semi supported". If the file size does prevent you to use it, you seem to have to find another option.

Increment variable faster while pressing button

$
0
0

This may as well be a feature of the lib, I have no experience with it unfortunately.

IonicBuildAndroidError

$
0
0

No, current cordova-android versions are fine for Android 4.1 and newer.

PROBLEM? emulator android==>4.3 ionic android==>6.2.2

$
0
0

Stop creating multiple topic for your problems.

PROBLEM? emulator android==>4.3 ionic android==>6.2.2


How to define variables in ionic

$
0
0

Thank u so much, finally my problem solved by using "provider" :slight_smile:

Ionic Storage problem

$
0
0

Do you have "Storage" anywhere else?
What is your ionic info?

Ionic Align Avatar On Top

$
0
0

Ok, basically the avatar is aligned to the center of the item, as per design...

So either you can set a margin-top on the avatar and force it to the top
margin-top: 2px !important

Or you can create an ion-row and put the avatar and name into 2 ion-col

<ion-row>
   <ion-col col-3>
       <ion-avatar item-start>
          <img src={{comment.snippet.topLevelComment.snippet.authorProfileImageUrl}}>
       </ion-avatar>
   </ion-col>
   <ion-col col-9>
      <h3 style="white-space: pre-line; color:blue; margin-top: 0px;">{{comment.snippet.topLevelComment.snippet.authorDisplayName}}</h3>
   </ion-col>
</ion-row>

I'd also recommend that you put the rest of the post into the next ion-row that spans the width of the ion-item...else you are losing a lot of the UI real estate.

Android back button not working

$
0
0

I think so too, but either not everybody experiences the same bug or their all using an alternative solution then.

How to hide some texts from slide menu ionic

$
0
0

I checked diffrent ways to solve my problem but when the value of login change to true then nothing change in the menu

Here my code

<button menuClose ion-item *ngIf="this.userService.isLogin">
        &nbsp;<img height="20 px" width="20 px" src="icons/XXX.png"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Logout
      </button>

note: when i checked this.{{userService.isLogin}} as a text and logedin then the value changed, but i don't know why nothing happens to the slide menu!!

Ionic Align Avatar On Top

Ionic Align Avatar On Top


IonicBuildAndroidError

$
0
0

but emulator is android 6.0 it's run

Audio in browser

$
0
0

I was under the impression that some IonicNative components work without Cordova present.
eg: GeoLocation. I use it in browsers with no Cordova.

InAppBrowser Not Auto Closing

$
0
0

After trying stuff for a few more hours i give up. I cant get the InAppBrowser pop-up to auto dismiss on login rejected. Maybe on the future Ionic will change this behaviour or better doc it.
Thanks for trying to help. See ya.

Ionic printer issue

$
0
0

Hi Sujan am really sorry actually am totally new to this field i have never posted in any forum.
I apologies for my mistake. Please help me.
so my home.html is

<ion-content padding>
 <button (click)="print()">Print</button>
</ion-content>

and my home.ts is

import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { Printer, PrintOptions } from '@ionic-native/printer';
@Component({
  selector: 'page-home',
  templateUrl: 'home.html'
})
export class HomePage {

  constructor(public navCtrl: NavController,private printer: Printer) {
  }
print()
{
this.printer.isAvailable().then(this.onSuccessLoad, this.onErrorLoad);
}

onSuccessLoad(){
let options: PrintOptions = {
name: 'MyDocument',
printerId: 'My Printer XYZ',
duplex: true,
landscape: true,
grayscale: true
};

this.printer.print("http://google.com",options).then(this.onSuccessPrint,
this.onErrorPrint);

}

onErrorLoad(){
alert('Error : printing is unavailable on your device ');
}

onSuccessPrint(){
alert("printing done successfully !");
}

onErrorPrint(){
alert("Error while printing !");
}

}

i have added printer in provider also in app.module.ts

so when app get loaded I get print button so when i click on it call print() method.
in print method i have
this.printer.isAvailable().then(this.onSuccessLoad, this.onErrorLoad);
so
it calls this.onErrorLoad method.It means printer is not available.
my onErrorLoad method is

onErrorLoad(){
alert('Error : printing is unavailable on your device ');
}

i want it should call this.onSuccessLoad.
please help me to make printer available so that this.onSuccessLoad can run.

Thanks

Node_modules waste disk space

$
0
0

when run
ionic start project template
there alway directory node_modules that have same modules in all projects
how to make it modules global an not trash project folder?

Viewing all 229551 articles
Browse latest View live


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