Quantcast
Channel: Ionic Forum - Latest topics
Viewing all 70434 articles
Browse latest View live

Content goes up when input is focused with keyboard in Ionic 4

$
0
0

@chuuthetwai wrote:

ion-content goes up when input is focused with keyboard in Ionic 4. Please give me an advice how I can solve this issue.
Thanks you…

Posts: 1

Participants: 1

Read full topic


IPhoneX: How to remove white space which is displayed in header after coming back from landscape to portrait

Use a compatible library with a minSdk of at most 16 or increase this project's minSdk version to at least 19,

$
0
0

@indraraj26 wrote:

Everything was working great i was able to build apk for some reason i have removed platform
ionic cordova platform rm android re-added with ionic cordova platform add android now i am end up with this error
Please let me know how can i resolve.

I had discussed with mike on slack he told me to add in config.xml
<preference name="android-minSdkVersion" value=" 19" />
but this was already there i cant find the way to resolve this.

Please check full description: https://github.com/ionic-team/ionic-cli/issues/3847

Posts: 1

Participants: 1

Read full topic

How to integrate fontawesome with ionic4?

$
0
0

@surumulluprudhviraj wrote:

Up to ionic3 versions i can able to add the fontawesome sucessfully but but in ionic4 icannot able to add. can you provide solution for it

Posts: 1

Participants: 1

Read full topic

I'm trying to build android app in ionic3

$
0
0

@gokulanathan wrote:

ionic cordova run android --prod --release
ionic-app-scripts build --prod --target cordova --platform android
[12:24:46] ionic-app-scripts 3.2.1
[12:24:46] build prod started …
[12:24:46] clean started …
[12:24:46] clean finished in 3 ms
[12:24:46] copy started …
[12:24:46] deeplinks started …
[12:24:46] deeplinks finished in 21 ms
[12:24:46] ngc started …
[12:24:50] typescript error
Type LinkPage in /Users/angelamal/Documents/osome/src/pages/link/link.ts is part of the declarations of 2
modules: AppModule in /Users/angelamal/Documents/osome/src/app/app.module.ts and LinkPageModule in
/Users/angelamal/Documents/osome/src/pages/link/link.module.ts! Please consider moving LinkPage in
/Users/angelamal/Documents/osome/src/pages/link/link.ts to a higher module that imports AppModule in
/Users/angelamal/Documents/osome/src/app/app.module.ts and LinkPageModule in
/Users/angelamal/Documents/osome/src/pages/link/link.module.ts. You can also create a new NgModule that
exports and includes LinkPage in /Users/angelamal/Documents/osome/src/pages/link/link.ts then import that
NgModule in AppModule in /Users/angelamal/Documents/osome/src/app/app.module.ts and LinkPageModule in
/Users/angelamal/Documents/osome/src/pages/link/link.module.ts.
[12:24:50] ionic-app-script task: “build”
[12:24:50] Error: The Angular AoT build failed. See the issues above
Error: The Angular AoT build failed. See the issues above
at /Users/angelamal/Documents/osome/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:237:55
at step (/Users/angelamal/Documents/osome/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:32:23)
at Object.next (/Users/angelamal/Documents/osome/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:13:53)
at fulfilled (/Users/angelamal/Documents/osome/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:4:58)
[ERROR] An error occurred while running subprocess ionic-app-scripts.
ionic-app-scripts build --prod --target cordova --platform android exited
with exit code 1.

while i tried to build an android app in ionic 3…

i used this code “ionic cordova build android --prod --release”

but it showing an error

Posts: 1

Participants: 1

Read full topic

SVG Rendering in Ionic 4

$
0
0

@Fl0ow wrote:

Hi all,

I have been trying to use an SVG in our new app to define icons all over the app. This to save space and not use bitmap images all the time that would increase our package size since we want to distribute this app in Apple App Store and Google Play Store.

So we are using Adobe XD, creating icons in it, then I am exporting it for Web using Adobe XD Design specs feature. This provides the possibility to export the icon as SVG.

My issue is the following: whatever the icon I have in XD just doesn’t get rendered as good when trying out the app, whatever the problem. I thought screenshots would better help describe the issue. This is my icon in Adobe XD:

image

Then this is the same icon exported by Adobe XD to SVG format, I open it in Chrome:

image

So far so good. Now here is rendering once in our ionic app:

image

There are some differences as you can see between what is being shown in Chrome, in Adobe XD, and what the app is rendering. The difference doesn’t seem like much, but actually when looking at it on an Android phone or iOS device it really shows. Especially when we programmatically colorize the icon.

So, my question is, first is there something we’re doing wrong in the implementation - I can share more code examples upon request if you guys need to know - and then if it’s not an implementation issue but more a platform support issue then how do you guys suggest we do to get our icons displayed with high fidelity while optimizing package size?

Posts: 1

Participants: 1

Read full topic

View getting stuck when entering page for second time

$
0
0

@Kyrax80 wrote:

Hello, I am using cordova maps plugin. I am facing a problem where if I enter my page once it works perfectly but if I leave the page and enter again, then it gets stuck in one of the steps. Idk what part of the code to post since it’s arround 2k lines of code. Has this happened to anyone?

Here is a video, the moment where I don’t show the phone’s screen is when I enter the map’s page, and then leave it and enter again (I can’t show anything else bec of privacy):

This started happening since I started to check if Bluetooth and GPS were on, if user accepted GPS permissions and if he had connection.

Posts: 1

Participants: 1

Read full topic

Adding ionic4 project to angular 7 workspace

$
0
0

@rajeshvs wrote:

Hi,
I have angular7 and ionic4 apps in completely different folders. The services code is duplicated.
I want to take advantage of the angular workspace. I want to make one service library and use both in the ionic and angular 7 app.

Posts: 1

Participants: 1

Read full topic


Ionic 4 change color tab on clik

$
0
0

@ninecmoi wrote:

hi,

I have a parent component, let’s call it component A. Inside I have 10 tabs : T1 to T10
Inside child component T1, i have a button to save() my data.
I want also, change de color when it’s done to have the visual information of which tab is saved.

How can I do that ?

I try different things to learn, for exemple, in the parent component A ngOnInit() :

let tab1 = this.el.nativeElement.querySelector(“ion-tab-button”);
tab1.innerText = “T1 saved”;

this.renderer.setStyle(
  tab1,
  'border',
  '2px dashed #FFE066'
); 

it works fine.

Now i want to access “ion-tab-button” from my function save() in the child component T1
But i’m lost on how i can do that.

Thank you
nine

Posts: 1

Participants: 1

Read full topic

In ionic 4 how to set background image?

$
0
0

@demokumar wrote:

hello team ,
I create ionic 4 project first time and want to set a background image to ion-content then I set it in class as
background: url("…/assets/imgs/home-bg.png"); but It gives error not work

Posts: 1

Participants: 1

Read full topic

Ionic 4 native element size is null

$
0
0

@npro27 wrote:

Why native element have 0 size in ngAfterViewInit?
I have embedded component like this:

//my parent component
...
<ion-content>
    <inner-component></inner-component>
</ion-content>
...

in inner component:

//html
  <div id="map" style="width:500px; height: 500px;"  #map  ></div>
//ts
...
@ViewChild('map') mapElement: ElementRef;
ngAfterViewInit() {
   console.log('height: ' + this.mapElement.nativeElement.offsetHeight);
   console.log('width: ' + this.mapElement.nativeElement.offsetWidth);
  }
...

Output is always “height: 0 width: 0”
But sometimes: “height: 500 width: 500”
I think that is because the element that i created has not been rendered in the Dom yet?
How i can solve this? Ionic hooks not work with embedded components(

Posts: 1

Participants: 1

Read full topic

Ionic 3 geolocation not working

$
0
0

@chakradharsw wrote:

Hi,
i’m trying to find geolocation in ionic 3. when i use geolocaton.getcurrentlocation it is showing error and i don’t know how to solve this issue.Below is code.

03%20AM

Anyone got suggestions or solution.

Posts: 1

Participants: 1

Read full topic

Using Observables in Ionic 3 and Angular 5

$
0
0

@sambhupal wrote:

Hi, I’m new in ionic 3,

  1. I can save sqlite data save to server database by using API (http).
  2. I have 4 data in my sqlite local storage.
  3. Following function: for each data is saved to server database successfully…
    a) after success i got a response from server.
    b) And according success message i run another function for delete single data(delete each data)
    c) But what I am seeing only no. 4 data is delete other remain same.

Here is my code:

synch(){

this.sqlite.create ({ name: “m_ilsapps.db”, location: “default” })
.then((db: SQLiteObject) => {
db.executeSql(“SELECT * FROM m_offline_pod_data ORDER BY m_offline_id ASC”, ).then((data) => {
if(data.rows.length > 0) {
for(var i = 0; i < data.rows.length; i++) {

    this.productInfo.m_offline_id = data.rows.item(i).m_offline_id;
    this.productInfo.m_pod_no = data.rows.item(i).m_pod_no;

this.http.post(“http://example.in/clix_mobile_apps/add-product-offline.php”,this.productInfo).subscribe( data => {
console.log( "SUCCESS => " + data);

let offlineupdate = JSON.parse(data["_body"]);

  if(offlineupdate.status == "success"){

this.MYdeleteData(this.productInfo.m_offline_id);

  }  else if(offlineupdate.status == "podnotmatch"){

 this.toast.show("POD MISMATCH...try again...", '5000', 'center').subscribe(
      toast => {
      console.log(toast);
      }
    );

  }

}, err=>{
  console.log("Error => "+ err);

    this.toast.show("NO SERVER RESPONSE...try again...", '5000', 'center').subscribe(
      toast => {
      console.log(toast);
      }
    );

});
}  // for each end
                       }
    console.log(this.products);
}, (error) => {
    console.log("ERROR: " + JSON.stringify(error));
             });
})

}

// delete function

MYdeleteData(myID){
alert(‘DELETE’+myID);
this.sqlite.create ({ name: “m_ilsapps.db”, location: “default” })
.then((db: SQLiteObject) => {
db.executeSql(“DELETE FROM m_offline_pod_data WHERE m_offline_id = '”+myID+"’", ).then((data) => {

 console.log(this.products);

}, (error) => {
  //alert('delete error v3-10012')
    console.log("ERROR: " + JSON.stringify(error));
  });

})
}

Please help me

Posts: 1

Participants: 1

Read full topic

Error: The Angular AoT build failed

$
0
0

@rranjan306 wrote:

After running ionic cordova build android --prod --release, i am getting the below error

[15:58:48] typescript error
Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing
the function or lambda with a reference to an exported function (position 194:31 in the original .ts file),
resolving symbol NgModule in
/home/deepak/Sinilabs/lovelace-mobile-app-admin/node_modules/ngx-restangular/node_modules/@angular/core/core.d.ts,
resolving symbol RestangularModule in
/home/deepak/Sinilabs/lovelace-mobile-app-admin/node_modules/ngx-restangular/dist/esm/src/ngx-restangular.module.d.ts,
resolving symbol RestangularModule in
/home/deepak/Sinilabs/lovelace-mobile-app-admin/node_modules/ngx-restangular/dist/esm/src/ngx-restangular.module.d.ts

Posts: 1

Participants: 1

Read full topic

Ion-item-sliding no working in v4 after reload items

$
0
0

@Villaescusa wrote:

Hello,

I have an ion-list that shows a list of ion-item-sliding with the option of “delete” in each one. When I delete one, I reset the array of elements and ask to the server to get me all of them again. After reload all items, the sliding is not working, it is showing the items but I can not slide any of them.

Could you help me?

HTML

<ion-content>
    
  <div >      
      <ion-segment [(ngModel)]="typeConf" >
        <ion-segment-button value="Users">
          <div > <ion-icon slot="start" name="person"></ion-icon > Usuarios </div>
        </ion-segment-button>
        <ion-segment-button value="Profiles">
          <div > <ion-icon slot="start" name="people"></ion-icon > Perfiles </div>
        </ion-segment-button>
        <ion-segment-button value="NewUsers">
          <div > <ion-icon slot="start" name="person-add"></ion-icon > Esperando <ion-badge color="danger" *ngIf="getNumUser()">{{getNumUser()}}</ion-badge> </div>
        </ion-segment-button>
      </ion-segment>
    </div>  
    ....
      <ion-list *ngSwitchCase="'Profiles'">
        <ion-item-sliding *ngFor="let p of sqlProfiles">
          <ion-item >
            {{p.name}}
            <ion-icon name="arrow-dropleft" color="primary" slot="end"></ion-icon>
          </ion-item>
          <ion-item-options>
            <ion-item-option color="danger" (click)="presentPromptDelProfile(p)">
              <ion-icon name="trash"></ion-icon>
              Del.
            </ion-item-option>
          </ion-item-options>
        </ion-item-sliding>     
      </ion-list>
  
  ....
        
    </div>
  </ion-content>

.TS

async presentPromptDelProfile(profile){
 
   const alert = await this.alertCtrl.create({
     header: 'Borrar perfil: '+ profile.name,
     message: '¿Desea borrar el perfil?',
     buttons: [
       {
         text: 'Cancelar',
         role: 'cancel',
         handler: data => {
           console.log('Cancel clicked');
         }
       },
       {
         text: 'Borrar',
         handler: data => {
           
             this.delProfile( profile);
           
         }
       }
     ]
   });
   await alert.present();
 }

 delProfile(profile) {
   this.provMess.modifyObj('delProfile',{idProf:profile.id, siteID:this.global.user.siteID}).then(elements => {
             this.sqlProfiles = elements;
         }).catch(err=>{
             console.log("ERROR DELETING PROFILES");
         });
 }

Ionic:

ionic (Ionic CLI) : 4.8.0 (C:\Users\villa\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.0.0-rc.1
@angular-devkit/build-angular : 0.11.4
@angular-devkit/schematics : 7.1.4
@angular/cli : 7.1.4
@ionic/angular-toolkit : 1.2.2

Cordova:

cordova (Cordova CLI) : not installed
Cordova Platforms : android 7.1.4
Cordova Plugins : not available

System:

NodeJS : v8.9.1 (C:\Program Files\nodejs\node.exe)
npm : 5.6.0
OS : Windows 10

Posts: 1

Participants: 1

Read full topic


PouchDB Database(.db) file not created in iOS & Android, while use ionic 4.x

$
0
0

@sudalaiyandi wrote:

Issue

I have created ionic app with latest version(4.x).For these, I have created pouchdb for access application.I used “cordova-sqlite” as adapter for pouchdb access in iOS/Android.

new PouchDB(‘employees.db’, { adapter: ‘cordova-sqlite’, location: ‘default’ } ) While i used this line database file not created in specific path. For support of pouchdb, i’ve added these plugin’s cordova-plugin-file and cordova-plugin-sqlite-2

Also get this error
ERROR Error: Uncaught (in promise): TypeError: process.nextTick is not a function TypeError: process.nextTick is not a function at home-home-module.js:26515 at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (polyfills.js:2736) at Object.onInvoke (vendor.js:51104) at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (polyfills.js:2735) at Zone.push../node_modules/zone.js/dist/zone.js.Zone.run (polyfills.js:2495) at polyfills.js:3234 at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (polyfills.js:2768) at Object.onInvokeTask (vendor.js:51095) at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (polyfills.js:2767) at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (polyfills.js:2540) at resolvePromise (polyfills.js:3176) at polyfills.js:3241 at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (polyfills.js:2768) at Object.onInvokeTask (vendor.js:51095) at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (polyfills.js:2767) at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (polyfills.js:2540) at drainMicroTaskQueue (polyfills.js:2946)

If i used previous version of ionic database file is created.

Info

  • Environment: hybrid app

  • Platform: iOS/Android

  • Adapter: cordova-sqlite

  • Server: CouchDB

  • PouchDB Version : 6.3.4

  • cordova-plugin-sqlite-2 : 1.0.4

  • cordova-plugin-file : 6.0.1

  • pouchdb-adapter-cordova-sqlite : 2.0.3

  • pouchdb-find: 6.3.4

  • Ionic:

    ionic (Ionic CLI) : 4.10.1 (/usr/local/lib/node_modules/ionic)
    Ionic Framework : @ionic/angular 4.0.0
    @angular-devkit/build-angular : 0.12.4
    @angular-devkit/schematics : 7.2.4
    @angular/cli : 7.2.4
    @ionic/angular-toolkit : 1.3.0

  • Cordova:

    cordova (Cordova CLI) : 8.0.0
    Cordova Platforms : android 7.0.0, ios 4.5.5
    Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.1, (and 5 other plugins)

  • System:

    ios-deploy : 1.9.2
    NodeJS : v8.11.3 (/usr/local/bin/node)
    npm : 6.1.0
    OS : macOS High Sierra
    Xcode : Xcode 9.4.1 Build version 9F2000

Reproduce

Create ionic app, with latest version(4.10.1), then access pouchdb in iOS/Android.

Posts: 1

Participants: 1

Read full topic

Cookie PHPSESSID changes on each HTTP request on iOS but not on Android

$
0
0

@aevargas wrote:

Hi,

I am developing an app for both android and ios. I have just ported over my files to a mac to develop on ios. Both android and ios uses the same set of files/code. I am testing my iOS version with an iPhone simulator on Xcode.

In my app I do multiple HTTP requests on different pages. The initial page is the login page and then once logged in it is redirected to the main menu. In my login page I do a HTTP post request to post the login details and by inspecting with safari, I can see that a set cookie is set with a PHPSESSID and the value. It redirects to the main menu and upon loading in the main menu runs a couple of HTTP get requests and I can see that these have also got set cookies in safari but the PHPSESSIDs are different.

I’ve done the same test on android and it all works fine and uses the same PHPSESSID. I’m not quite sure what’s causing this but would appreciate some help!

Thanks!

Posts: 2

Participants: 2

Read full topic

Ionic cli freeze

HTTP.post Cordova is not available

$
0
0

@justed wrote:

I’m migrating from Ionic 3 to Ionic 4 and have some troubles using the new HTTP function. When I use this.http.post or this.http.get it’s not working when I testrun the app in my browser. I get the message

[Warning] Native: tried calling HTTP.post, but Cordova is not available. Make sure to include cordova.js or run in a device/simulator

But how can I include cordova.js ?

Posts: 1

Participants: 1

Read full topic

Address Bar - auto hide or force

$
0
0

@shepard wrote:

With Ionic 4, is there now a way to hide the address bar?
Either automatically when scrolling or forced?
I am referring to in a browser.

Posts: 1

Participants: 1

Read full topic

Viewing all 70434 articles
Browse latest View live


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