mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
40 lines
783 B
TypeScript
40 lines
783 B
TypeScript
import { Component, ViewEncapsulation } from '@angular/core';
|
|
import { Location } from '@angular/common';
|
|
import { Router } from '@angular/router';
|
|
import { NavController } from '@ionic/angular';
|
|
|
|
@Component({
|
|
selector: 'page-three',
|
|
template: `
|
|
<ion-page>
|
|
<ion-header>
|
|
<ion-toolbar>
|
|
<ion-title>Page Three</ion-title>
|
|
</ion-toolbar>
|
|
</ion-header>
|
|
<ion-content padding>
|
|
Page Three {{ts}}
|
|
<div>
|
|
<ion-button (click)="navPop()">Go Back</ion-button>
|
|
</div>
|
|
</ion-content>
|
|
</ion-page>
|
|
`
|
|
})
|
|
export class PageThree {
|
|
|
|
ts: number;
|
|
constructor(private router: Router, private location: Location) {
|
|
|
|
setInterval(() => {
|
|
this.ts = Date.now();
|
|
}, 500);
|
|
}
|
|
|
|
|
|
navPop() {
|
|
window.history.back();
|
|
}
|
|
|
|
}
|