Ionic Angular, specifically version 3.9.10, represents the final major release of the Ionic Framework that was directly built and tightly coupled with Angular's architecture predominant at the time (primarily Angular 4 and 5). This package delivered a comprehensive suite of UI components and tooling for constructing hybrid mobile and progressive web applications leveraging standard web technologies like HTML, CSS, and JavaScript. It featured deep integration with Angular's service, component, and routing systems, alongside its bespoke navigation mechanism centered around `NavController`. Ionic 3 employed JIT compilation for Angular components and extensively utilized the `@IonicPage` decorator for implementing lazy loading of pages. This version of `ionic-angular` is now considered deprecated and receives no further maintenance or feature updates. It has been effectively superseded by Ionic Framework v4 and subsequent versions (e.g., v8.x), which are consumed via the `@ionic/angular` package. The contemporary Ionic Framework (currently at v8.x, as indicated by recent release notes) has evolved to offer a more framework-agnostic core, built on Web Components, providing specific integrations for Angular, React, and Vue, and fully supporting AOT compilation. The modern framework exhibits a rapid release cadence, with bug fixes often delivered bi-weekly and minor feature updates typically released monthly.
npm install ionic-angularVerified import paths — ran on the pinned version, not inferred.
Demonstrates a basic Ionic 3 page component using `NavController` for navigation and the `IonicPage` decorator for lazy loading, typical of Ionic v3 application structure.
Migrate your project to the modern Ionic Framework (v4+) using the `@ionic/angular` package. This typically involves generating a new Ionic v4+ project and gradually migrating components, services, and styling. Key changes include switching from `NavController` to Angular Router, replacing `@IonicPage` lazy loading with standard Angular lazy loading, and updating component markup.
For Ionic 4+ applications, use the Angular Router for all navigation, leveraging `ion-router-outlet` for Ionic-specific animations and stack management. Refactor `NavController` calls to `router.navigate()` or `navController.navigateForward()` (from `@ionic/angular`).
Remove `@IonicPage` decorators and ensure all pages/components are imported via standard Angular modules (`NgModule`) and lazy-loaded via the Angular Router's `loadChildren` property. Each lazy-loaded page in Ionic 3 typically had its own `page.module.ts` file; in Ionic 4+, this is aligned with standard Angular module bundling.
Maintain the specific Angular, TypeScript, and `@ionic/app-scripts` versions recommended for Ionic 3.9.10 projects. If modern Angular features are required, a full migration to Ionic 4+ is necessary.
When migrating or starting new projects, consider using Capacitor instead of Cordova for native functionality. Capacitor provides a more future-proof and integrated solution within the Ionic ecosystem.
In Ionic 3, ensure `NavController` is injected in the constructor of your page components. In Ionic 4+, replace `NavController` usage with the Angular Router (`RouterModule`, `Router`, `ActivatedRoute`) for navigation, and `ion-router-outlet` for stack-based navigation.
Ensure that any custom components are correctly declared in an `NgModule` (e.g., a shared `ComponentsModule`) and that this module is imported into the `NgModule` of any page that uses these components. For lazy-loaded pages with `@IonicPage`, their `page.module.ts` must import modules containing shared components.
For Ionic 3 projects, run `npm install ionic-angular@3.9.10 --save`. For Ionic 4+ projects, update all imports from `ionic-angular` to `@ionic/angular` and ensure `@ionic/angular` is installed.
Ensure that every page decorated with `@IonicPage()` has an accompanying `page.module.ts` file with a properly configured `@NgModule` that imports `IonicPageModule.forChild(YourPage)`. Alternatively, if lazy loading is not desired, remove the `@IonicPage()` decorator and import the page directly into `AppModule`.