Hi
I am facing one trouble with my code where i am pushing the page 1 to page 2. But its always giving me invalid link.
I am attaching my home.ts coding.
------------------- home.ts code
import { Component } from ‘@angular/core’;
import { NavController, Platform, ActionSheet, ActionSheetController } from ‘ionic-angular’;
import {Aboutus} from ‘…/aboutus/aboutus’;
@Component({
selector: ‘page-home’,
templateUrl: ‘home.html’
})
export class HomePage {
aboutus = Aboutus;
constructor(
public navCtrl: NavController,
public actionsheetCtrl:ActionSheetController,
public platform: Platform,
) {}
openMenu(){ // function of open menu
let actionSheet = this.actionsheetCtrl.create({
title: ‘Albums’,
cssClass: ‘action-sheets-basic-page’,
buttons: [
{
text: ‘Delete’,
role: ‘destructive’,
icon: !this.platform.is(‘ios’) ? ‘trash’ : null,
handler: () => {
//console.log(‘Delete clicked’);
//alert(“Deleted click”);
this.navCtrl.push(‘aboutus’);
}
},
{
text: ‘Share’,
icon: !this.platform.is(‘ios’) ? ‘share’ : null,
handler: () => {
console.log(‘Share clicked’);
}
},
{
text: ‘Play’,
icon: !this.platform.is(‘ios’) ? ‘arrow-dropright-circle’ : null,
handler: () => {
console.log(‘Play clicked’);
}
},
{
text: ‘Favorite’,
icon: !this.platform.is(‘ios’) ? ‘heart-outline’ : null,
handler: () => {
console.log(‘Favorite clicked’);
}
},
{
text: ‘Cancel’,
role: ‘cancel’, // will always sort to be on the bottom
icon: !this.platform.is(‘ios’) ? ‘close’ : null,
handler: () => {
console.log(‘Cancel clicked’);
}
}
]
});
actionSheet.present();
}
}
aboutus.ts file
import { Component } from ‘@angular/core’;
import { NavController } from ‘ionic-angular’;
@Component({
selector: ‘page-aboutus’,
templateUrl: ‘aboutus.html’
})
export class Aboutus {
constructor(public navCtrl: NavController) {
}
}
i am not to sure where the error is coming in this.
Regards
Saju