Hi ionic community,
I have created a new application to train me about Ionic (i’m new) but I have a problem that i cannot solve by myself. I try to add a page to a text Tabs but I cannot access to my new page.
Look the code of my new page (it’s like the others pages, like about…)
classements.ts
import { Component } from ‘@angular/core’;
import { NavController } from ‘ionic-angular’;
@Component({
selector: ‘page-classements’,
templateUrl: ‘classements.html’
})
export class ClassementsPage {
constructor(public navCtrl: NavController) {
}
}
classements.html
import { Component } from ‘@angular/core’;
import { NavController } from ‘ionic-angular’;
@Component({
selector: ‘page-classements’,
templateUrl: ‘classements.html’
})
export class ClassementsPage {
constructor(public navCtrl: NavController) {
}
}
tabs.ts
import { Component } from ‘@angular/core’;
import { AboutPage } from ‘…/about/about’;
import { ContactPage } from ‘…/contact/contact’;
import { HomePage } from ‘…/home/home’;
import { ClassementsPage } from ‘…/classements/classements’;
@Component({
templateUrl: ‘tabs.html’
})
export class TabsPage {
tab1Root = HomePage;
tab2Root = AboutPage;
tab3Root = ContactPage;
tab4Root = ClassementsPage;
constructor() {
}
}
tabs.html
In this page (I cannot paste the code, i don’t know why) but I add a tab4root with my new page.
Also, i have ridden this (but I didn’t find a solution) :
http://ionicframework.com/docs/components/#tabs
Thanks to help me !