Andrew Fletcher published: 20 April 2022 1 minute read
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.
Now use these 'classes' as follows
<ion-content class="ion-padding" *ngIf="loaded" color="medium">
Related articles
Andrew Fletcher
•
11 Oct 2023
Launching app code in a simulator like Xcode or Android Studio
Loading the code in a platform - in this article, I'll be focusing on Android and iOS. Ionic app shell prompts for iOS and Android devices. Here's a breakdown of the commands:npm run buildThis command is used to build your web app. It's typically associated with web development frameworks...
Andrew Fletcher
•
29 Sep 2023
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.Glancing at the modification dates, the last...
Andrew Fletcher
•
08 Aug 2022
How to update package.json dependencies to the latest version?
This article works through the steps to update dependencies in package.json file to the latest version.
Use npm-check-updates or npm outdated to suggest the latest versions.
npm-check-updates is a utility that automatically adjusts a package.json with the latest version of all...