Use Capacitor HTTP for native API calls in Ionic, fetch for web
Route Ionic API calls through Capacitor HTTP on native devices while keeping fetch for browser and PWA builds.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Route Ionic API calls through Capacitor HTTP on native devices while keeping fetch for browser and PWA builds.
Ionic's ion-router-outlet caches visited pages by default. This note covers when that default fits, how to refresh stale data with lifecycle hooks, where the trust boundaries sit, and what to measure before shipping.
Restyle Ionic components without brittle deep selectors. Learn how to use documented CSS custom properties and ::part() to override ion-button styles safely across browser and device WebViews.
Ionic's ion-router-outlet keeps visited pages mounted, so ngOnInit does not re-run on back navigation. Here is where to refresh data and clean up.
Decide between @capacitor-community/push and @capacitor-fcm/fcm for Ionic push notifications. Compare features, trade‑offs, and see a step‑by‑step implementation of the community push plugin with validation steps.
Learn how to make your Ionic app automatically follow the OS dark‑mode setting using CSS variables and the prefers‑color‑scheme media query. A step‑by‑step guide, trade‑offs, and a quick test checklist.
ngOnInit doesn't re-run when Ionic caches pages, causing stale data on back-navigation. Use ionViewWillEnter for per-visit refresh.
Ionic's lazy loading splits each page into its own bundle so users only download code when they navigate to it. Here's how to convert routes, verify the split, and avoid the singleton-service trap.
When building an Ionic Angular app, deciding between Angular Router and Ionic NavController can shape navigation, deep linking, and user experience. This guide weighs constraints, compares features, and walks through a concrete implementation to help you pick the right approach.