Ionic Angular (v3)

3.9.10 · deprecated · verified Sun Apr 19

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.

Common errors

Warnings

Install

Imports

Quickstart

Demonstrates a basic Ionic 3 page component using `NavController` for navigation and the `IonicPage` decorator for lazy loading, typical of Ionic v3 application structure.

import { Component } from '@angular/core';
import { NavController, IonicPage } from 'ionic-angular';

@IonicPage({
  segment: 'home-page'
})
@Component({
  selector: 'page-home',
  templateUrl: 'home.html'
})
export class HomePage {
  constructor(public navCtrl: NavController) {}

  // Example of navigating to another lazy-loaded page by its string name
  goToAboutPage() {
    this.navCtrl.push('AboutPage', { param1: 'value1' });
  }

  // Example of setting a new root page
  goToRootPage() {
    this.navCtrl.setRoot('WelcomePage');
  }

  // An example of Ionic 3 lifecycle hook
  ionViewDidLoad() {
    console.log('HomePage did load!');
  }
}

// In app.module.ts (simplified)
// import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
// @NgModule({
//   declarations: [MyApp],
//   imports: [IonicModule.forRoot(MyApp)],
//   bootstrap: [IonicApp],
//   entryComponents: [MyApp],
//   providers: [{provide: ErrorHandler, useClass: IonicErrorHandler}]
// })
// export class AppModule {}

// For a lazy-loaded page 'AboutPage', it would have its own about.module.ts:
// import { NgModule } from '@angular/core';
// import { IonicPageModule } from 'ionic-angular';
// import { AboutPage } from './about';
// @NgModule({
//   declarations: [AboutPage],
//   imports: [IonicPageModule.forChild(AboutPage)],
//   exports: [AboutPage]
// })
// export class AboutPageModule {}

view raw JSON →