Seems there was a change in Ionic 3 that changed the class name of generated pages (ionic g page Foo
) from “FooPage” to “Foo”:
2.3.0 foo.ts
:
import { Component } from '@angular/core';
import { NavController, NavParams } from 'ionic-angular';
/*
Generated class for the Foo page.
See http://ionicframework.com/docs/v2/components/#navigation for more info on
Ionic pages and navigation.
*/
@Component({
selector: 'page-foo',
templateUrl: 'foo.html'
})
export class FooPage {
constructor(public navCtrl: NavController, public navParams: NavParams) {}
ionViewDidLoad() {
console.log('ionViewDidLoad FooPage');
}
}
3.0.0 foo.ts
:
import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
/**
* Generated class for the Foo page.
*
* See http://ionicframework.com/docs/components/#navigation for more info
* on Ionic pages and navigation.
*/
@IonicPage()
@Component({
selector: 'page-foo',
templateUrl: 'foo.html',
})
export class Foo {
constructor(public navCtrl: NavController, public navParams: NavParams) {
}
ionViewDidLoad() {
console.log('ionViewDidLoad Foo');
}
}
On one side this is just a naming change. But on the other side it is quite confusing especially if you started with Ionic 2 and now switched to Ionic 3. All the examples (and e.g. starter templates!) still use the old naming scheme, tutorials etc.
Is there anything more than naming to it that I missed?