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

How to do sidemenu on top of main content?

$
0
0

Were u able to solve this issue?


Calculating two date difference in *ngFor loop

$
0
0

I have an array of objects where I am looping through to display data in the HTML using *ngFor... each object also contains 2 dates , start and end.

How can I calculate the difference and display it in months / years ?

what is the best way in this case to achieve this, thanx

Calculating two date difference in *ngFor loop

$
0
0

HTML:

<ion-item *ngFor="let event of events">
        {{calcuateDif(event)}}
</ion-item>

TS:

calculateDif(event)
{
let diff = Math.abs(event.date1 - event.date2);
return new Date(diff);
}

Guidance on Ionic 2 PWA with cordova plugins

$
0
0

same question any replacement for sqlite-storage,file-opner2 api in pwa

Calculating two date difference in *ngFor loop

$
0
0

hi, thanx for your answer , just one more thing about the loop
*ngFor="let event of events | slice:0:3; let i=index
I am only taking the first 3 ... is there a way just to pass those 3 .. Im just concerned about the load and maybe performance, not sure if it really causes any!

Ionic CLI Verifying each time my libraries version

$
0
0

Good idea, thank you! I'll also post the answer here if it will be approved in the issues.

Ionic 2 - Display text while recording video on camera screen

$
0
0

I am working with ionic 2 in which i am using Media Capture plugin to record video and Camera plugin for capturing pictures. All what i want is to display custom text on camera screen while video is being recorded.

I am using this code for capturing video

this.mediaCapture.captureVideo({ limit: 1, duration: 120 }).then((data: MediaFile[]) => {
console.log(JSON.stringify(data));
},
(err: CaptureError) => {
console.error(err)
});

Is there any way to send additional parameter which can be used to display text on video recording screen.

Lowest Android version without problem as of July 2017

$
0
0

OK. Now is July 2017. I have read a few topics in early and mid-2016 regarding Ionic problems with Android 4.1 and 4.2. On and off, workarounds like Crosswalk and polyfills have been suggested as potential solutions.

May I know the lowest Android version we can go with Ionic 2 or Ionic 3 without problem? I just want the app to run as it is on the available Android Web View and iOS UIWebKit on the phone. I have decided to avoid Crosswalk and other ES6 and ES 2015 polyfills and shims. From my personal experience, polyfills do not work 100% all the time, and while it may solve or hide some obvious problems, quirky problems may still arise later on.

My intention is to evaluate how much of a potential user base still on 4.1-4.3 Jelly Bean or 4.4.x Kit Kat I can afford to forgo.

My definition of problem is not just obvious crashes (scripts failing to run, components not responding to touch), visual artifacts (missing visual artifacts or effects like lines and shadows), but also includes performance (slow or jerky scrolling also counts as a problem).

Would be great if anyone can share with me what works and what doesn't after using Ionic 2 or 3 for a while now.


Recorded audio not playing in android kit kat, working fine in marshmallow

$
0
0

I am struggling with media plugin for playing recorded audio in android kit kat. I can record and save file in my application directory but its not playing audio. Its working fine in marshmallow. Below is the code that i am using.

startRecord(){
// alert(this.myquestions.Id);
this.filename= 'demo.amr';

this.file.createFile(this.file.externalDataDirectory+this.filename,true).then((fileEntry)=>{

    this.fileUrl =  fileEntry.toInternalURL();
    this.myMedia = this.media.create(this.fileUrl,this.statusupdate, this.onSuccess, this.onError);
    this.myMedia.startRecord();
    let timer = 120;
    this.mediaTimer = setInterval(()=> {
    timer = timer - 1;
    if (timer <= 0) {
        clearInterval(this.mediaTimer);
        this.myMedia.stopRecord();
 		}

    }, 1000);
  });

}

playRecord(){
this.myMedia = this.media.create(this.fileUrl,this.statusupdate, this.onSuccess, this.onError);
this.myMedia.play();
}

Calculating two date difference in *ngFor loop

$
0
0

*ngFor="let event of events.slice(0,3)"

Ionic package - Android build error

$
0
0

The solution did not work for me. Any other tips?

Edit: got it to work by also changing the config.xml.

Complete solution is to:

cordova platform update android@6.2.3 --save

then update ''config.xml´´

< engine name="android" spec="~6.2.3" />

Is this possible to change action sheet mode change

$
0
0

i want to change ios styled actionsheet.

Ionic2 App takes too long to start

$
0
0

After using --prod my app takes 16sec to load.

Ionic2 App takes too long to start

$
0
0

Yes i have Log from my xcode when i'm running my app in device after building it from terminal.

2017-07-10 12:50:55.195 BenzineKostern[202:8142] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///private/var/mobile/Containers/Data/Application/451168A2-645B-4F9B-96C5-E81A20886CD7/Library/Cookies/Cookies.binarycookies
2017-07-10 12:50:57.962 BenzineKostern[202:8142] Apache Cordova native platform version 4.4.0 is starting.
2017-07-10 12:50:57.965 BenzineKostern[202:8142] Multi-tasking -> Device: YES, App: YES
2017-07-10 12:50:58.250 BenzineKostern[202:8142] Using UIWebView
2017-07-10 12:50:58.258 BenzineKostern[202:8142] [CDVTimer][handleopenurl] 0.675976ms
2017-07-10 12:50:58.273 BenzineKostern[202:8142] Unlimited access to network resources
2017-07-10 12:50:58.274 BenzineKostern[202:8142] [CDVTimer][intentandnavigationfilter] 15.762985ms
2017-07-10 12:50:58.275 BenzineKostern[202:8142] [CDVTimer][gesturehandler] 0.419021ms
2017-07-10 12:50:58.278 BenzineKostern[202:8142] [CDVTimer][admob] 2.825975ms
2017-07-10 12:50:58.377 BenzineKostern[202:8142] [CDVTimer][splashscreen] 98.049998ms
2017-07-10 12:50:58.412 BenzineKostern[202:8142] [CDVTimer][statusbar] 34.932971ms
2017-07-10 12:50:58.428 BenzineKostern[202:8142] [CDVTimer][keyboard] 14.663994ms
2017-07-10 12:50:58.428 BenzineKostern[202:8142] [CDVTimer][TotalPluginStartup] 171.472967ms
2017-07-10 12:50:59.563 BenzineKostern[202:8142] Resetting plugins due to page load.
2017-07-10 12:51:00.582 BenzineKostern[202:8142] THREAD WARNING: ['Device'] took '12.613037' ms. Plugin should use a background thread.
2017-07-10 12:51:16.051 BenzineKostern[202:8267] CFNetwork SSLHandshake failed (-9806)
2017-07-10 12:51:17.474 BenzineKostern[202:8142] deviceready has not fired after 5 seconds.
2017-07-10 12:51:17.475 BenzineKostern[202:8142] Channel not fired: onDOMContentLoaded
2017-07-10 12:51:17.476 BenzineKostern[202:8142] WARN: Ionic Native: deviceready did not fire within 5000ms. This can happen when plugins are in an inconsistent state. Try removing plugins from plugins/ and reinstalling them.
2017-07-10 12:51:17.476 BenzineKostern[202:8142] Ionic Native: deviceready event fired after 13684 ms
2017-07-10 12:51:19.834 BenzineKostern[202:8142] Finished load of: file:///var/containers/Bundle/Application/32C51F6B-643C-440E-84FE-73A952E22DFB/BenzineKostern.app/www/index.html
2017-07-10 12:51:19.867 BenzineKostern[202:8142] THREAD WARNING: ['Keyboard'] took '18.012939' ms. Plugin should use a background thread.
2017-07-10 12:51:20.008 BenzineKostern[202:8142] THREAD WARNING: ['StatusBar'] took '137.495850' ms. Plugin should use a background thread.
2017-07-10 12:51:20.019 BenzineKostern[202:8142] createBanner
2017-07-10 12:51:22.757 BenzineKostern[202:8276] To get test ads on this device, call: request.testDevices = @[ @"18eb32d77e925f20209d35acc9149639" ];
2017-07-10 12:51:23.233 BenzineKostern[202:8142] showBanner
2017-07-10 12:51:23.238 BenzineKostern[202:8142] statusbar offset:20.000000, overlap:0, ad position:8, x:0, y:0
2017-07-10 12:51:23.271 BenzineKostern[202:8142] window, resize,
2017-07-10 12:51:23.277 BenzineKostern[202:8142] THREAD WARNING: ['AdMob'] took '44.109619' ms. Plugin should use a background thread.

Push Notification not working when App is Closed

$
0
0

Ok Got the solution. its bcoz of the Custom ROMs in Mi , Huawei Devices. They kill GCM when user close the app. Other phones it works fine.


webpackJsonp not found when running ionic-starter-aws

$
0
0

thanks you .this solution is woks me

Ionic slider + loop + click event issue

$
0
0

hello friends,
I am using slider with dynamic data using property loop and autoplay

<ion-slides *ngIf="slides != null" loop="true"> <!-- autoplay="3000" loop="true" speed="800"-->
        <ion-slide *ngFor="let slide of slides; let i = index ;" >
            <img [src]="slide.BannerImage" (click)="fnGotoNewArrivalList(i)">
            <div class="con-box">
                <h2>{{slide.BannerName}}</h2>
            </div>
        </ion-slide>
    </ion-slides>

Button/Click does not work when going from last slide to first slide
slide next and slide previous both scenario.

NOTE - its working fine without loop property

thank you,

Ionic 3 page redirection with firebase

$
0
0

I am using ionic 3.

And I installed angular fire 2 .

My root page is the dashboard.

Below my UpdateProfile section.

Here is my form (updateprofile.html)

 <form [formGroup]="updateprofile"  novalidate >
                <div>
                    <img (click)="upload()" *ngIf="ImageURL" class="image2" [src]="ImageURL">
                    <img  *ngIf="File" class="image2" [src]="File" imageViewer/>
                    <img (click)="upload()" *ngIf="!File && !ImageURL " class="image2" src="http://vignette1.wikia.nocookie.net/dragonage/images/f/f4/User-info.png/revision/latest?cb=20100528043005" imageViewer/>
                </div>
                    <h6 (click)="upload()">Edit Photo</h6>
                    <p (click)="view()"><ion-icon name="eye"></ion-icon>&nbsp;&nbsp;View Profile</p>
                <ion-list>
                    <ion-item >
                       <ion-label floating >First Name</ion-label>
                        <ion-icon name="ios-person-outline" item-left></ion-icon>
                        <ion-input type="text" name="FirstName"  formControlName="FIRST_NAME"></ion-input>
                    </ion-item>

                    <ion-item >
                        <ion-label floating >Last Name</ion-label>
                        <ion-icon name="ios-person-outline" item-left></ion-icon>
                        <ion-input type="text" name="FirstName" formControlName="LAST_NAME"></ion-input>
                    </ion-item>

                    <ion-item >
                        <ion-label floating >Address</ion-label>
                         <ion-icon name="ios-home-outline" item-left></ion-icon>
                        <ion-input type="text" name="FirstName" formControlName="ADDRESS"></ion-input>
                    </ion-item>

                    <ion-item>
                        <ion-label floating>Email</ion-label>
                        <ion-icon name="ios-mail-outline" item-left></ion-icon>
                        <ion-input type="email" disabled="true" name="Email" formControlName="EMAIL"></ion-input>
                    </ion-item>

                    <ion-item>
                       <ion-label floating>Mobile 1</ion-label>
                       <ion-icon name="ios-call-outline" item-left></ion-icon>
                       <ion-input type="text" name="Username" formControlName="MOBILE1"></ion-input>
                    </ion-item>

                    <ion-item>
                        <ion-label floating>Mobile 2</ion-label>
                        <ion-icon name="ios-call-outline" item-left></ion-icon>
                        <ion-input type="text" name="Username" formControlName="MOBILE2"></ion-input>
                    </ion-item>

                    <ion-item>
                        <ion-label>Gender</ion-label>
                        <ion-select formControlName="GENDER">
                            <ion-option value="Female">Female</ion-option>
                            <ion-option value="Male">Male</ion-option>
                        </ion-select>
                    </ion-item>
                </ion-list>

                     <div class="btn" (click)="submit($event)">
                        <button class="update" ion-button >Update</button>
                     </div>
            </form>

Here is my submit function(updateprofile.ts)

submit(event: Event){
    event.preventDefault();
    if(this.ImageURL != undefined)
    {
       var fileName = 'sample-' + new Date().getTime() + '.jpg';
       let uploadTask = this.firebase.storage().ref('profile/' + fileName);
        console.log(this.updateprofile.value);
         uploadTask.put(this.getURL).then((snapshot) => {
         this.updateprofile.controls['FILE'].setValue(snapshot.downloadURL);
         var val=this.af.database.list('/users');
         val.update(this.key,this.updateprofile.value);
         this.platform.ready().then(() => {
            window.plugins.toast.show("Profile updated success", "short",'bottom',1000);
       });

     });
    }
   if(this.ImageURL === undefined)
   {
      console.log(this.updateprofile.value);
     var val=this.af.database.list('/users');
     val.update(this.key,this.updateprofile.value);
     this.platform.ready().then(() => {
              window.plugins.toast.show("Profile update success", "short",'bottom',1000);

         });
    // this.editvalue=true;
   }
  }

I didn't write any code in page redirection.But Page is automatically redirected to the Root page.

If I disabled the firebase update function.The page does not redirect to rootpage.

How can i fix this issue.

I have no idea.

Kindly advice me,

Thanks.

Ionic2 App takes too long to start

Ionic slider + loop + click event issue

Viewing all 229556 articles
Browse latest View live


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