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

Image not displaying while displaying contacts


Ionic time select fails to display AM / PM for Android

$
0
0

Works for iOS, but fails in Android with replacing AM / PM with …

Here’s the code that works for iOS

<ion-datetime  #datePicker
		text-center
		(ionChange)="dateChanged($event)"
  displayFormat="hh:mm A" 
  minuteValues="0,10,20,30,40,50"
  [(ngModel)]="time"
  (ionCancel)="navCtrl.pop()"
  >

on iOS the above code allows the user to scroll through and select either AM / PM

My ionic app suddenly stuck on splash screen before it was running

$
0
0

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.9.2
ionic (Ionic CLI) : 3.9.2

global packages:

Cordova CLI : 9.0.0 (cordova-lib@9.0.1) 

local packages:

@ionic/app-scripts : 3.2.0
Cordova Platforms  : android 8.0.0 browser 6.0.0 ios 5.0.1
Ionic Framework    : ionic-angular 3.9.2

System:

Android SDK Tools : 26.1.1
ios-deploy        : 1.9.4 
ios-sim           : 8.0.1 
Node              : v10.15.3
npm               : 6.4.1 
OS                : macOS
Xcode             : Xcode 10.2.1 Build version 10E1001

IONIC 4 : Loading Controller, dismiss() is called before present() which will keep spinner without dismissing

$
0
0

Hi @VictorNorman,

Did you mean something like this?

Service

loader:HTMLIonLoadingElement;
  constructor(private loadingController: LoadingController) { }

  async presentLoader(options: any = {}) {
    this.loader = await this.loadingController.create(options);
    await this.loader.present();
  }

  async dismissLoader() {
      await this.loader.dismiss()
      .then(()=>{
        this.loader = null;
      })
      .catch(e => console.log(e));
  }

Controller:
this.service.presentLoader() and this.service.dismissloader() from the page. Is it?
Thats when I ended up with the issue mentioned in the title of this question. Please correct me if I am going wrong somewhere.

Ionic 4 - How to Handle "N" Details Page

$
0
0

How to Create N Details Page.
Here is My Json Structure

"categories":[{"name":"category","child-categories":"[{"name":"child_category","child-categories":"[{},{},{}]"},{},{}]",}]

In Ionic 4, I created a Category Page.If it has child_categories, it dig down to self with that data.
category.page.ts

openCategories(category){
let temp_breadcrumbs:any;
temp_breadcrumbs=JSON.parse(JSON.stringify(this.breadcrumbs));
temp_breadcrumbs.push(category.name)
let navigationExtras: NavigationExtras = {
queryParams:{‘name’ : category.name},
queryParamsHandling: ‘merge’ ,
state:{
‘categories’: category.child_categories,
‘breadcrumbs’:temp_breadcrumbs
}
};
//this.navCtrl.navigateForward([“tabs/tab1/child-category”],navigationExtras); I Tried This Also.
this.router.navigate([“tabs/tab1/category”],navigationExtras).then(val=>{console.log(val)},
rej=>{console.log(rej)}).catch(val=>{
console.log(val);
});

I don’t know why ionic 4 not open self as new page with navigation extras…

Ionic cordova run android (native run issue)

$
0
0

What is the difference between native-run and cordova run??

Handle app restores from background

$
0
0

fix:

platform.ready().then(() =>
{
platform.resume.subscribe ( (e) => {
this.ngOnInit();
});
});

thanks,
vignesh

Ionic 4 - How to Handle "N" Details Page

$
0
0

Hello @KsspAm43

  1. On your categories page :

IMPORT

import { Router } from '@angular/router';

CONSTRUCTOR

constructor(private router: Router) { }

TO SEND DATA TO DETAIL PAGE:

this.router.navigate(['/detail', {
      post: JSON.stringify(yourObject)
}]);
  1. On the detail page:

IMPORT

import { ActivatedRoute } from '@angular/router';

CONSTRUCTOR

constructor(private activatedRoute: ActivatedRoute) {
   this.post = JSON.parse( this.activatedRoute.snapshot.paramMap.get('post') );
}

No provider for ChangeDetectorRef

$
0
0

I am getting this error after updating ionic to 5 and npm i -g native-run

Before everything was fine, after this update getting error like this

ng:///AppModule/AppComponent_Host.ngfactory.js:5 ERROR Error: StaticInjectorError(AppModule)[IonRouterOutlet -> ChangeDetectorRef]:
StaticInjectorError(Platform: core)[IonRouterOutlet -> ChangeDetectorRef]:
NullInjectorError: No provider for ChangeDetectorRef!
at NullInjector.push…/node_modules/@angular/core/fesm5/core.js.NullInjector.get

My ionic app suddenly stuck on splash screen before it was running

$
0
0

Did you check console in the inspector? Maybe there’s an error.

Ionic 4 - How to Handle "N" Details Page

$
0
0

okay i will try…Thanks For Fast Reply

Ionic 4 Social Sharing crashes app

$
0
0

Hi,

SocialSharing plugin crashes during ionic serve despite it is added in the app.module providers array and injected on my screen’s constructor. Error message is below

index.js:413 Uncaught TypeError: Object(…) is not a function
at index.js:413
at Module…/node_modules/@ionic-native/social-sharing/index.js (index.js:590)
at webpack_require (bootstrap:83)
at Module…/src/app/app.module.ts (app.component.ts:11)
at webpack_require (bootstrap:83)
at Module…/src/main.ts (main.ts:1)
at webpack_require (bootstrap:83)
at Object.0 (main.ts:12)
at webpack_require (bootstrap:83)
at checkDeferredModules (bootstrap:45)

and the version info is

ionic info

Ionic:

Ionic CLI : 5.0.0 (C:\Users\xxxxx\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.5.0
@angular-devkit/build-angular : 0.13.9
@angular-devkit/schematics : 7.3.9
@angular/cli : 7.3.9
@ionic/angular-toolkit : 1.5.1

Cordova:

Cordova CLI : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : none
Cordova Plugins : no whitelisted plugins (1 plugins total)

Utility:

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

System:

Android SDK Tools : 26.1.1 (C:\Users\xxxxx\AppData\Local\Android\Sdk)
NodeJS : v10.15.0 (C:\Program Files\nodejs\node.exe)
npm : 6.4.1
OS : Windows 10

Thanks in advsnce

Different behavior in Ionic by using type file and capture attribute of a native input element

$
0
0

I want to display a list of options when a file is gotten by using a type file native input element. The list of options that I usually got when I programming for web is: camera, video, recorder and device directories & files.

This way:

Expected behavior:

It expects that, by using the same code of web the behavior will be the same:

<input type="file" capture />

Example: http://jsfiddle.net/4WHw5/3/show

Open it in a android device

Actual behavior:

It displays just a device directories and files.

Information about the issue:

Ionic CLI : 5.0.3 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.5.0
@angular-devkit/build-angular : 0.13.9
@angular-devkit/schematics : 7.3.9
@angular/cli : 7.3.9
@ionic/angular-toolkit : 1.5.1

Steps to reproduce the behavior:

  1. Create a new tabs template Ionic project.
  2. Write into tab1.page.html: <input type="file" capture />
  3. Build and deploy in android device.
  4. Press input.

Can anybody help me install and use mobiscroll in ionic studio?

$
0
0

Yes. They have a free forms component on github.

InAppBrowser not working in Android as it is in iOS

$
0
0

Hi Rodolphe

Thanks for the reply, sorry that was my mistake for not pasting the closing tag in.


Ionic 4 - How to Handle "N" Details Page

$
0
0

Ionic 4 - How to Handle "N" Details Page

$
0
0

If you want clean and beautiful URL:

  1. You should create a service
  2. param your root ( example: path: ‘detail/:id’ )
  3. on the url pass only the id
  4. on the detail pass find the post by the id

My ionic app suddenly stuck on splash screen before it was running

$
0
0

yes i checked but there is no any error
its running perfect in the browser too

Livereload ERR_CLEARTEXT_NOT_PERMITTED

Ionic 4 - How to Handle "N" Details Page

$
0
0

Okay Good Idea. Also Got Tutorial For this Routing…

Viewing all 228529 articles
Browse latest View live


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