Skip to main content

Cordova plugins not loading in Ionic

Updating the Cordova plugins... there are two locations to manage the plugins

  • config.xml
  • package.json

I was finding some Cordova functionality was not coming through... through further investigation the two files above had conflicting data.

 

Review the data

package.json

Ionic Angular html tag showing in text

The issue

Text through the app is being rendered as

<p>Depletion estimates, Age and size composition, Catch, Effort, Catch rates, Fishing mortality</p>

Therefore, in this instance the HTML p tags are being displayed along with the text.

 

The code

Currently the code outputting this is written as:

Why is Ionic 5 / 6 content padding not working?

If you have upgraded Ionic to 5 or 6 you will have experienced that the padding attribute is not working anymore.

<ion-content padding *ngIf="loaded" color="medium">

Use of attributes was deprecated in Ionic v4.  If you would have noticed in developers console, Ionic 4 was presenting warnings of using these attributes.  So post Ionic 4, these attributes were transitioned to CSS classes.

ionic app that hasn't been updated for a while - what did I do?

I recently received an ionic app that hasn't been updated for quite some time.  What steps did I do to unpack this situation and as a minimum get the packages updated?

To start, I did a quick check on the number of packages missing or outdated can be discovered through using the command:

npm outdated

Reponse from command:

Setting up an ionic app

Recently a client handed me code that runs an app through iOS and Android.  No details about whether native or otherwise.  Once I had the opportunity to crawl through the code, definitely not native.  Typescript, Angular, Cordova... etc.

Subscribe to 6.x