mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
test(nav): remove unused tests
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
import {Directive} from '@angular/core';
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
@Directive({
|
||||
selector: 'ion-nav'
|
||||
})
|
||||
export class NavRouter {
|
||||
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
import {Component} from '@angular/core';
|
||||
import {Routes} from '@angular/router';
|
||||
import {Location} from '@angular/common';
|
||||
import {ionicBootstrap, NavParams, ViewController} from '../../../../../src';
|
||||
|
||||
|
||||
@Component({templateUrl: 'view1.html'})
|
||||
class View1Cmp {
|
||||
path: string;
|
||||
windowHash: string;
|
||||
|
||||
constructor(location: Location, private viewCtrl: ViewController) {
|
||||
this.path = location.path();
|
||||
console.log(`View1Cmp, path: ${this.path}`);
|
||||
}
|
||||
|
||||
ionViewDidEnter() {
|
||||
this.windowHash = window.location.hash;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Component({templateUrl: 'view2.html'})
|
||||
class View2Cmp {
|
||||
path: string;
|
||||
windowHash: string;
|
||||
|
||||
constructor(location: Location, private viewCtrl: ViewController) {
|
||||
this.path = location.path();
|
||||
console.log(`View2Cmp, path: ${this.path}`);
|
||||
}
|
||||
|
||||
ionViewDidEnter() {
|
||||
this.windowHash = window.location.hash;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Component({templateUrl: 'view3.html'})
|
||||
class View3Cmp {
|
||||
id: string;
|
||||
path: string;
|
||||
windowHash: string;
|
||||
|
||||
constructor(params: NavParams, location: Location, private viewCtrl: ViewController) {
|
||||
this.id = params.get('id');
|
||||
this.path = location.path();
|
||||
console.log(`View3Cmp, path: ${this.path}, param id: ${this.id}`);
|
||||
}
|
||||
|
||||
ionViewDidEnter() {
|
||||
this.windowHash = window.location.hash;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Component({})
|
||||
@Routes([
|
||||
{ path: '/', component: View1Cmp },
|
||||
{ path: '/2', component: View2Cmp },
|
||||
{ path: '/3/:id', component: View3Cmp }
|
||||
])
|
||||
class E2EApp {
|
||||
constructor(private location: Location) {}
|
||||
}
|
||||
|
||||
ionicBootstrap(E2EApp);
|
||||
@@ -1,31 +0,0 @@
|
||||
<ion-header>
|
||||
|
||||
<ion-navbar>
|
||||
<button menuToggle>
|
||||
<ion-icon name="menu"></ion-icon>
|
||||
</button>
|
||||
<ion-title>First View</ion-title>
|
||||
</ion-navbar>
|
||||
|
||||
</ion-header>
|
||||
|
||||
|
||||
<ion-content padding>
|
||||
|
||||
<h4>
|
||||
Window Hash: {{windowHash}}
|
||||
</h4>
|
||||
<h4>
|
||||
Location Path: {{path}}
|
||||
</h4>
|
||||
<h4>
|
||||
ViewController Id: {{viewCtrl.id}}
|
||||
</h4>
|
||||
<p>
|
||||
<a href="#/2">Second View via href</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="#/3/151">Third View via href, 151 as id param</a>
|
||||
</p>
|
||||
|
||||
</ion-content>
|
||||
@@ -1,33 +0,0 @@
|
||||
<ion-header>
|
||||
|
||||
<ion-navbar primary>
|
||||
<ion-title>Second View</ion-title>
|
||||
<ion-buttons end>
|
||||
<button>
|
||||
<ion-icon name="help"></ion-icon>
|
||||
</button>
|
||||
</ion-buttons>
|
||||
</ion-navbar>
|
||||
|
||||
</ion-header>
|
||||
|
||||
|
||||
<ion-content padding>
|
||||
|
||||
<h4>
|
||||
Window Hash: {{windowHash}}
|
||||
</h4>
|
||||
<h4>
|
||||
Location Path: {{path}}
|
||||
</h4>
|
||||
<h4>
|
||||
ViewController Id: {{viewCtrl.id}}
|
||||
</h4>
|
||||
<p>
|
||||
<a href="#/3/27">Third View via href, 27 as id param</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="#/">First View via href</a>
|
||||
</p>
|
||||
|
||||
</ion-content>
|
||||
@@ -1,31 +0,0 @@
|
||||
<ion-header>
|
||||
|
||||
<ion-navbar primary>
|
||||
<ion-title>Third View</ion-title>
|
||||
</ion-navbar>
|
||||
|
||||
</ion-header>
|
||||
|
||||
|
||||
<ion-content padding>
|
||||
|
||||
<h4>
|
||||
Window Hash: {{windowHash}}
|
||||
</h4>
|
||||
<h4>
|
||||
Location Path: {{path}}
|
||||
</h4>
|
||||
<h4>
|
||||
NavParams, id: {{id}}
|
||||
</h4>
|
||||
<h4>
|
||||
ViewController Id: {{viewCtrl.id}}
|
||||
</h4>
|
||||
<p>
|
||||
<a href="#/2">Second View via href</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="#/">First View via href</a>
|
||||
</p>
|
||||
|
||||
</ion-content>
|
||||
Reference in New Issue
Block a user