The back button is not not clickable when navigate to a new view.
Expected behavior: To navigate to the previous page or view with I it the back button from the navigation bar…
import { Component, ViewChild } from ‘@angular/core’;
import { NavController } from ‘ionic-angular’;
import { Class1 } from ‘…/…/views/page1/page1’;
import { Class2 } from ‘…/…/views/page2/page2’;
@Component({
selector: ‘htmlfile’,
templateUrl: ‘htmlfile.html’
})
export class htmlFileClass {
@ViewChild(‘content’) nav: NavController
public rootPage = Games;
pageViews: Array<{ title: string, component: any }>;
constructor(
public navCtrl: NavController
) {
this.pageViews= [
{ title: ‘Page Title 1’, component: Class1 },
{ title: ‘Page Title 2’, component: Class2 }
];
}
openPage(view) {
console.log(view);
this.navCtrl.push(view.component, {
title: view.title
});
}