mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 20:33:32 +08:00
docs(demos): update API demos so they all have ion-navs
- add spacing between imports - alphabetize imports - removed app.html files in favor of an inline ion-nav - cleaned up config demo so it uses proper syntax - use file name main.html for the first page for the demo - name the app ApiDemoApp and first page ApiDemoPage - replace the ion-toolbars with ion-navbars closes #7019 closes driftyco/ionic-site#647
This commit is contained in:
@ -1 +0,0 @@
|
|||||||
<ion-nav [root]="root"></ion-nav>
|
|
@ -1,11 +1,12 @@
|
|||||||
import {Component} from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {ionicBootstrap, ActionSheet, NavController, Platform} from 'ionic-angular';
|
|
||||||
|
import { ActionSheet, ionicBootstrap, NavController, Platform } from 'ionic-angular';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'main.html'
|
||||||
})
|
})
|
||||||
export class InitialPage {
|
export class ApiDemoPage {
|
||||||
constructor(public nav: NavController, public platform: Platform) { }
|
constructor(public nav: NavController, public platform: Platform) { }
|
||||||
|
|
||||||
present() {
|
present() {
|
||||||
@ -58,10 +59,10 @@ export class InitialPage {
|
|||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'app.html'
|
template: '<ion-nav [root]="root"></ion-nav>'
|
||||||
})
|
})
|
||||||
class ApiDemoApp {
|
class ApiDemoApp {
|
||||||
root = InitialPage;
|
root = ApiDemoPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
ionicBootstrap(ApiDemoApp);
|
ionicBootstrap(ApiDemoApp);
|
||||||
|
@ -1 +0,0 @@
|
|||||||
<ion-nav [root]="root"></ion-nav>
|
|
@ -1,11 +1,12 @@
|
|||||||
import {Component} from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {ionicBootstrap, Alert, NavController} from 'ionic-angular';
|
|
||||||
|
import { Alert, ionicBootstrap, NavController } from 'ionic-angular';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'main.html'
|
||||||
})
|
})
|
||||||
export class InitialPage {
|
export class ApiDemoPage {
|
||||||
testRadioOpen = false;
|
testRadioOpen = false;
|
||||||
testRadioResult: any;
|
testRadioResult: any;
|
||||||
testCheckboxOpen = false;
|
testCheckboxOpen = false;
|
||||||
@ -211,10 +212,10 @@ export class InitialPage {
|
|||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'app.html'
|
template: '<ion-nav [root]="root"></ion-nav>'
|
||||||
})
|
})
|
||||||
class ApiDemoApp {
|
class ApiDemoApp {
|
||||||
root = InitialPage;
|
root = ApiDemoPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
ionicBootstrap(ApiDemoApp);
|
ionicBootstrap(ApiDemoApp);
|
||||||
|
@ -1,10 +1,19 @@
|
|||||||
import {Component} from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {ionicBootstrap} from 'ionic-angular';
|
|
||||||
|
import { ionicBootstrap } from 'ionic-angular';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'main.html'
|
||||||
})
|
})
|
||||||
class ApiDemoApp {}
|
class ApiDemoPage {}
|
||||||
|
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
template: '<ion-nav [root]="root"></ion-nav>'
|
||||||
|
})
|
||||||
|
class ApiDemoApp {
|
||||||
|
root = ApiDemoPage;
|
||||||
|
}
|
||||||
|
|
||||||
ionicBootstrap(ApiDemoApp);
|
ionicBootstrap(ApiDemoApp);
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<ion-header>
|
<ion-header>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-navbar>
|
||||||
<ion-title>Button</ion-title>
|
<ion-title>Button</ion-title>
|
||||||
</ion-toolbar>
|
</ion-navbar>
|
||||||
|
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
import {Component} from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {ionicBootstrap} from 'ionic-angular';
|
|
||||||
|
import { ionicBootstrap } from 'ionic-angular';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'main.html'
|
||||||
})
|
})
|
||||||
class ApiDemoApp {
|
class ApiDemoPage {
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
jon: true,
|
jon: true,
|
||||||
@ -23,4 +24,12 @@ class ApiDemoApp {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
template: '<ion-nav [root]="root"></ion-nav>'
|
||||||
|
})
|
||||||
|
class ApiDemoApp {
|
||||||
|
root = ApiDemoPage;
|
||||||
|
}
|
||||||
|
|
||||||
ionicBootstrap(ApiDemoApp);
|
ionicBootstrap(ApiDemoApp);
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<ion-header>
|
<ion-header>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-navbar>
|
||||||
<ion-title>Checkbox</ion-title>
|
<ion-title>Checkbox</ion-title>
|
||||||
</ion-toolbar>
|
</ion-navbar>
|
||||||
|
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
import {Component} from '@angular/core';
|
import { ionicBootstrap, IonicApp, Platform, NavController } from 'ionic-angular';
|
||||||
import {ionicBootstrap, IonicApp, Platform, NavController} from 'ionic-angular';
|
|
||||||
|
|
||||||
|
|
||||||
if (!window.localStorage) {
|
if (!window.localStorage) {
|
||||||
@ -74,14 +74,14 @@ if (window.localStorage.getItem('configDemo')) {
|
|||||||
templateUrl: 'tabs.html'
|
templateUrl: 'tabs.html'
|
||||||
})
|
})
|
||||||
export class TabPage {
|
export class TabPage {
|
||||||
tabOne = InitialPage;
|
tabOne = ApiDemoPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'main.html'
|
||||||
})
|
})
|
||||||
export class InitialPage {
|
export class ApiDemoPage {
|
||||||
config: any;
|
config: any;
|
||||||
initialConfig: any;
|
initialConfig: any;
|
||||||
|
|
||||||
@ -113,14 +113,14 @@ export class InitialPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
push() {
|
push() {
|
||||||
this.nav.push(AnotherPage);
|
this.nav.push(PushPage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'page.html'
|
templateUrl: 'page.html'
|
||||||
})
|
})
|
||||||
export class AnotherPage {
|
export class PushPage {
|
||||||
constructor(public nav: NavController) {}
|
constructor(public nav: NavController) {}
|
||||||
|
|
||||||
pop() {
|
pop() {
|
||||||
|
@ -46,14 +46,15 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<p class="note">Any config for your app should be passed as the third argument to ionicBootstrap.</p>
|
||||||
|
|
||||||
<!-- this has to be formatted weird for pre -->
|
<!-- this has to be formatted weird for pre -->
|
||||||
<pre margin>@App({
|
<pre margin>
|
||||||
config: {
|
ionicBootstrap(MyApp, [], {
|
||||||
backButtonIcon: "{{initialConfig.backButtonIcon}}"
|
backButtonIcon: "{{initialConfig.backButtonIcon}}"
|
||||||
iconMode: "{{initialConfig.iconMode}}"
|
iconMode: "{{initialConfig.iconMode}}"
|
||||||
tabbarPlacement: "{{initialConfig.tabbarPlacement}}"
|
tabbarPlacement: "{{initialConfig.tabbarPlacement}}"
|
||||||
}
|
});</pre>
|
||||||
})</pre>
|
|
||||||
|
|
||||||
<div padding>
|
<div padding>
|
||||||
<button block secondary (click)="push()">
|
<button block secondary (click)="push()">
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
<ion-navbar *navbar>
|
<ion-header>
|
||||||
|
<ion-navbar>
|
||||||
<ion-title>Page</ion-title>
|
<ion-title>Page</ion-title>
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
|
</ion-header>
|
||||||
|
|
||||||
<ion-content>
|
<ion-content>
|
||||||
<div padding>
|
<div padding>
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
import {Component} from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {ionicBootstrap} from 'ionic-angular';
|
|
||||||
|
import { ionicBootstrap } from 'ionic-angular';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'main.html'
|
||||||
})
|
})
|
||||||
class MainPage {
|
class ApiDemoPage {
|
||||||
wwwReleased = '1991';
|
wwwReleased = '1991';
|
||||||
netscapeReleased = '1994-12-15T13:47:20.789';
|
netscapeReleased = '1994-12-15T13:47:20.789';
|
||||||
operaReleased = '1995-04-15';
|
operaReleased = '1995-04-15';
|
||||||
@ -68,7 +69,7 @@ class MainPage {
|
|||||||
template: '<ion-nav [root]="root"></ion-nav>'
|
template: '<ion-nav [root]="root"></ion-nav>'
|
||||||
})
|
})
|
||||||
class ApiDemoApp {
|
class ApiDemoApp {
|
||||||
root = MainPage;
|
root = ApiDemoPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
ionicBootstrap(ApiDemoApp);
|
ionicBootstrap(ApiDemoApp);
|
||||||
|
41
demos/events/app.html
Normal file
41
demos/events/app.html
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
<ion-menu #menu [content]="content">
|
||||||
|
|
||||||
|
<ion-toolbar secondary>
|
||||||
|
<ion-title>Left Menu</ion-title>
|
||||||
|
</ion-toolbar>
|
||||||
|
|
||||||
|
<ion-content>
|
||||||
|
|
||||||
|
<ion-list *ngIf="loggedIn">
|
||||||
|
<ion-list-header>
|
||||||
|
Logged in as <b>Administrator</b>
|
||||||
|
</ion-list-header>
|
||||||
|
<button ion-item menuClose *ngFor="let p of loggedInPages" (click)="openPage(menu, p)">
|
||||||
|
<ion-label primary>{{p.title}}</ion-label>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button ion-item menuToggle>
|
||||||
|
Close Menu
|
||||||
|
</button>
|
||||||
|
|
||||||
|
</ion-list>
|
||||||
|
|
||||||
|
<ion-list *ngIf="!loggedIn">
|
||||||
|
<ion-list-header>
|
||||||
|
Please Log In
|
||||||
|
</ion-list-header>
|
||||||
|
<button ion-item menuClose *ngFor="let p of loggedOutPages" (click)="openPage(menu, p)">
|
||||||
|
<ion-label primary>{{p.title}}</ion-label>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button ion-item menuToggle>
|
||||||
|
Close Menu
|
||||||
|
</button>
|
||||||
|
|
||||||
|
</ion-list>
|
||||||
|
</ion-content>
|
||||||
|
|
||||||
|
</ion-menu>
|
||||||
|
|
||||||
|
|
||||||
|
<ion-nav id="nav" [root]="root" #content swipeBackEnabled="false"></ion-nav>
|
@ -1,8 +1,11 @@
|
|||||||
import {Component, ViewChild} from '@angular/core';
|
import { Component, ViewChild } from '@angular/core';
|
||||||
import {ionicBootstrap, Events, Nav} from 'ionic-angular';
|
|
||||||
|
import { Events, ionicBootstrap, Nav } from 'ionic-angular';
|
||||||
|
|
||||||
|
|
||||||
@Component({templateUrl: 'login.html'})
|
@Component({
|
||||||
|
templateUrl: 'login.html'
|
||||||
|
})
|
||||||
class Login {
|
class Login {
|
||||||
user = {
|
user = {
|
||||||
name: "Administrator",
|
name: "Administrator",
|
||||||
@ -17,7 +20,10 @@ class Login {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Component({templateUrl: 'logout.html'})
|
|
||||||
|
@Component({
|
||||||
|
templateUrl: 'logout.html'
|
||||||
|
})
|
||||||
class Logout {
|
class Logout {
|
||||||
constructor(private events: Events) {}
|
constructor(private events: Events) {}
|
||||||
|
|
||||||
@ -26,18 +32,22 @@ class Logout {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'app.html'
|
||||||
})
|
})
|
||||||
class ApiDemoApp {
|
class ApiDemoApp {
|
||||||
@ViewChild(Nav) nav: Nav;
|
@ViewChild(Nav) nav: Nav;
|
||||||
|
|
||||||
rootView = Login;
|
root = Login;
|
||||||
loggedIn = false;
|
loggedIn = false;
|
||||||
|
|
||||||
pages = [
|
loggedInPages = [
|
||||||
{ title: 'Logout', component: Logout, showLoggedIn: true },
|
{ title: 'Logout', component: Logout }
|
||||||
{ title: 'Login', component: Login, showLoggedIn: false },
|
];
|
||||||
|
|
||||||
|
loggedOutPages = [
|
||||||
|
{ title: 'Login', component: Login }
|
||||||
];
|
];
|
||||||
|
|
||||||
constructor(private events: Events) {
|
constructor(private events: Events) {
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
<button menuToggle>
|
<button menuToggle>
|
||||||
<ion-icon name="menu"></ion-icon>
|
<ion-icon name="menu"></ion-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<ion-title>
|
<ion-title>
|
||||||
Events
|
Events
|
||||||
</ion-title>
|
</ion-title>
|
||||||
@ -12,7 +13,7 @@
|
|||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
|
||||||
<ion-content #content>
|
<ion-content>
|
||||||
|
|
||||||
<h3 margin-left>Login</h3>
|
<h3 margin-left>Login</h3>
|
||||||
<p margin>Click the login button to use the credentials below. Then, toggle the menu to see the menu items change.</p>
|
<p margin>Click the login button to use the credentials below. Then, toggle the menu to see the menu items change.</p>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
|
<ion-header>
|
||||||
|
|
||||||
<ion-navbar *navbar>
|
<ion-navbar>
|
||||||
<button menuToggle>
|
<button menuToggle>
|
||||||
<ion-icon name="menu"></ion-icon>
|
<ion-icon name="menu"></ion-icon>
|
||||||
</button>
|
</button>
|
||||||
@ -7,9 +8,11 @@
|
|||||||
<ion-title>
|
<ion-title>
|
||||||
Events
|
Events
|
||||||
</ion-title>
|
</ion-title>
|
||||||
</ion-navbar>
|
</ion-navbar>
|
||||||
|
|
||||||
<ion-content #content>
|
</ion-header>
|
||||||
|
|
||||||
|
<ion-content>
|
||||||
<h3 margin-left>Logout</h3>
|
<h3 margin-left>Logout</h3>
|
||||||
<p margin>Click the logout button to logout. Then, toggle the menu to see the menu items change.</p>
|
<p margin>Click the logout button to logout. Then, toggle the menu to see the menu items change.</p>
|
||||||
|
|
||||||
|
@ -1,27 +0,0 @@
|
|||||||
<ion-menu #menu [content]="content">
|
|
||||||
|
|
||||||
<ion-toolbar secondary>
|
|
||||||
<ion-title>Left Menu</ion-title>
|
|
||||||
</ion-toolbar>
|
|
||||||
|
|
||||||
<ion-content>
|
|
||||||
|
|
||||||
<ion-list>
|
|
||||||
<ion-item *ngIf="loggedIn">
|
|
||||||
Welcome, Administrator!
|
|
||||||
</ion-item>
|
|
||||||
<button ion-item menuClose *ngFor="let p of pages" (click)="openPage(menu, p)" [hidden]="(loggedIn == true && p.showLoggedIn == false) || (loggedIn == false && p.showLoggedIn == true)">
|
|
||||||
<ion-label primary>{{p.title}}</ion-label>
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<button ion-item menuToggle>
|
|
||||||
Close Menu
|
|
||||||
</button>
|
|
||||||
|
|
||||||
</ion-list>
|
|
||||||
</ion-content>
|
|
||||||
|
|
||||||
</ion-menu>
|
|
||||||
|
|
||||||
|
|
||||||
<ion-nav id="nav" [root]="rootView" #content swipeBackEnabled="false"></ion-nav>
|
|
@ -1,10 +1,19 @@
|
|||||||
import {Component} from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {ionicBootstrap} from 'ionic-angular';
|
|
||||||
|
import { ionicBootstrap } from 'ionic-angular';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'main.html'
|
||||||
})
|
})
|
||||||
class ApiDemoApp {}
|
class ApiDemoPage {}
|
||||||
|
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
template: '<ion-nav [root]="root"></ion-nav>'
|
||||||
|
})
|
||||||
|
class ApiDemoApp {
|
||||||
|
root = ApiDemoPage;
|
||||||
|
}
|
||||||
|
|
||||||
ionicBootstrap(ApiDemoApp);
|
ionicBootstrap(ApiDemoApp);
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<ion-header>
|
<ion-header>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-navbar>
|
||||||
<ion-title>HideWhen</ion-title>
|
<ion-title>HideWhen</ion-title>
|
||||||
</ion-toolbar>
|
</ion-navbar>
|
||||||
|
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
@ -1,10 +1,19 @@
|
|||||||
import {Component} from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {ionicBootstrap} from 'ionic-angular';
|
|
||||||
|
import { ionicBootstrap } from 'ionic-angular';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'main.html'
|
||||||
})
|
})
|
||||||
class ApiDemoApp {}
|
class ApiDemoPage {}
|
||||||
|
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
template: '<ion-nav [root]="root"></ion-nav>'
|
||||||
|
})
|
||||||
|
class ApiDemoApp {
|
||||||
|
root = ApiDemoPage;
|
||||||
|
}
|
||||||
|
|
||||||
ionicBootstrap(ApiDemoApp);
|
ionicBootstrap(ApiDemoApp);
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<ion-header>
|
<ion-header>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-navbar>
|
||||||
<ion-title>Icon</ion-title>
|
<ion-title>Icon</ion-title>
|
||||||
</ion-toolbar>
|
</ion-navbar>
|
||||||
|
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<ion-header>
|
<ion-header>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-navbar>
|
||||||
<ion-title>Infinite Scroll</ion-title>
|
<ion-title>Infinite Scroll</ion-title>
|
||||||
</ion-toolbar>
|
</ion-navbar>
|
||||||
|
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
@ -1,10 +1,19 @@
|
|||||||
import {Component} from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {ionicBootstrap} from 'ionic-angular';
|
|
||||||
|
import { ionicBootstrap } from 'ionic-angular';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'main.html'
|
||||||
})
|
})
|
||||||
class ApiDemoApp {}
|
class ApiDemoPage {}
|
||||||
|
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
template: '<ion-nav [root]="root"></ion-nav>'
|
||||||
|
})
|
||||||
|
class ApiDemoApp {
|
||||||
|
root = ApiDemoPage;
|
||||||
|
}
|
||||||
|
|
||||||
ionicBootstrap(ApiDemoApp);
|
ionicBootstrap(ApiDemoApp);
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<ion-header>
|
<ion-header>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-navbar>
|
||||||
<ion-title>Input</ion-title>
|
<ion-title>Input</ion-title>
|
||||||
</ion-toolbar>
|
</ion-navbar>
|
||||||
|
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
import {Component} from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {ionicBootstrap, ItemSliding, Toast, NavController} from 'ionic-angular';
|
|
||||||
|
import { ionicBootstrap, ItemSliding, NavController, Toast } from 'ionic-angular';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'main.html'
|
||||||
})
|
})
|
||||||
class InitialPage {
|
class ApiDemoPage {
|
||||||
chats: any[];
|
chats: any[];
|
||||||
logins: any[];
|
logins: any[];
|
||||||
|
|
||||||
@ -89,7 +90,7 @@ class InitialPage {
|
|||||||
template: '<ion-nav [root]="root"></ion-nav>'
|
template: '<ion-nav [root]="root"></ion-nav>'
|
||||||
})
|
})
|
||||||
class ApiDemoApp {
|
class ApiDemoApp {
|
||||||
root = InitialPage;
|
root = ApiDemoPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
ionicBootstrap(ApiDemoApp);
|
ionicBootstrap(ApiDemoApp);
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<ion-header>
|
<ion-header>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-navbar>
|
||||||
<ion-title>Item Sliding</ion-title>
|
<ion-title>Item Sliding</ion-title>
|
||||||
</ion-toolbar>
|
</ion-navbar>
|
||||||
|
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
@ -2,12 +2,12 @@ import { Component } from '@angular/core';
|
|||||||
|
|
||||||
import { ionicBootstrap } from 'ionic-angular';
|
import { ionicBootstrap } from 'ionic-angular';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'main.html'
|
||||||
})
|
})
|
||||||
class ApiDemoPage {
|
class ApiDemoPage {}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
template: '<ion-nav [root]="root"></ion-nav>'
|
template: '<ion-nav [root]="root"></ion-nav>'
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<ion-header>
|
<ion-header>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-navbar>
|
||||||
<ion-title>Item</ion-title>
|
<ion-title>Item</ion-title>
|
||||||
</ion-toolbar>
|
</ion-navbar>
|
||||||
|
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
@ -1,10 +1,19 @@
|
|||||||
import {Component} from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {ionicBootstrap} from 'ionic-angular';
|
|
||||||
|
import { ionicBootstrap } from 'ionic-angular';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'main.html'
|
||||||
})
|
})
|
||||||
class ApiDemoApp {}
|
class ApiDemoPage {}
|
||||||
|
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
template: '<ion-nav [root]="root"></ion-nav>'
|
||||||
|
})
|
||||||
|
class ApiDemoApp {
|
||||||
|
root = ApiDemoPage;
|
||||||
|
}
|
||||||
|
|
||||||
ionicBootstrap(ApiDemoApp);
|
ionicBootstrap(ApiDemoApp);
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<ion-header>
|
<ion-header>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-navbar>
|
||||||
<ion-title>Label</ion-title>
|
<ion-title>Label</ion-title>
|
||||||
</ion-toolbar>
|
</ion-navbar>
|
||||||
|
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
@ -5,9 +5,8 @@ import { ionicBootstrap } from 'ionic-angular';
|
|||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'main.html'
|
||||||
})
|
})
|
||||||
class ApiDemoPage {
|
class ApiDemoPage {}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
template: '<ion-nav [root]="root"></ion-nav>'
|
template: '<ion-nav [root]="root"></ion-nav>'
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<ion-header>
|
<ion-header>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-navbar>
|
||||||
<ion-title>List</ion-title>
|
<ion-title>List</ion-title>
|
||||||
</ion-toolbar>
|
</ion-navbar>
|
||||||
|
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import {Component, ViewEncapsulation} from '@angular/core';
|
import { Component, ViewEncapsulation } from '@angular/core';
|
||||||
import {ionicBootstrap, Loading, NavController, Platform} from 'ionic-angular';
|
|
||||||
|
import { ionicBootstrap, Loading, NavController, Platform } from 'ionic-angular';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<ion-header>
|
<ion-header>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-navbar>
|
||||||
<ion-title>Loading</ion-title>
|
<ion-title>Loading</ion-title>
|
||||||
</ion-toolbar>
|
</ion-navbar>
|
||||||
|
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
import {Component} from '@angular/core';
|
import { Component, Injectable, Pipe, PipeTransform } from '@angular/core';
|
||||||
import {ionicBootstrap, IonicApp, Config, Platform} from 'ionic-angular';
|
|
||||||
import {Storage, LocalStorage} from 'ionic-angular';
|
import { Config, IonicApp, ionicBootstrap, LocalStorage, Platform, Storage } from 'ionic-angular';
|
||||||
import {Pipe, PipeTransform, Injectable} from '@angular/core'
|
|
||||||
|
|
||||||
|
|
||||||
@Pipe({name: 'cleanLocalData'})
|
@Pipe({
|
||||||
|
name: 'cleanLocalData'
|
||||||
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
class CleanLocalDataPipe implements PipeTransform {
|
class CleanLocalDataPipe implements PipeTransform {
|
||||||
validKeys: string[];
|
validKeys: string[];
|
||||||
@ -29,7 +30,7 @@ class CleanLocalDataPipe implements PipeTransform {
|
|||||||
templateUrl: 'main.html',
|
templateUrl: 'main.html',
|
||||||
pipes: [CleanLocalDataPipe]
|
pipes: [CleanLocalDataPipe]
|
||||||
})
|
})
|
||||||
class MainPage {
|
class ApiDemoPage {
|
||||||
local: Storage;
|
local: Storage;
|
||||||
localStorageDemo: string;
|
localStorageDemo: string;
|
||||||
myItem: any;
|
myItem: any;
|
||||||
@ -84,7 +85,7 @@ class MainPage {
|
|||||||
pipes: [CleanLocalDataPipe]
|
pipes: [CleanLocalDataPipe]
|
||||||
})
|
})
|
||||||
class ApiDemoApp {
|
class ApiDemoApp {
|
||||||
root = MainPage;
|
root = ApiDemoPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
ionicBootstrap(ApiDemoApp);
|
ionicBootstrap(ApiDemoApp);
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<ion-header>
|
<ion-header>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-navbar>
|
||||||
<ion-title>Local Storage</ion-title>
|
<ion-title>Local Storage</ion-title>
|
||||||
</ion-toolbar>
|
</ion-navbar>
|
||||||
|
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
34
demos/menu/app.html
Normal file
34
demos/menu/app.html
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<ion-menu [content]="content" id="menu1">
|
||||||
|
|
||||||
|
<ion-toolbar secondary>
|
||||||
|
<ion-title>Menu 1</ion-title>
|
||||||
|
</ion-toolbar>
|
||||||
|
|
||||||
|
<ion-content>
|
||||||
|
<ion-list>
|
||||||
|
<button ion-item menuClose="menu1" detail-none>
|
||||||
|
Close Menu 1
|
||||||
|
</button>
|
||||||
|
</ion-list>
|
||||||
|
</ion-content>
|
||||||
|
|
||||||
|
</ion-menu>
|
||||||
|
|
||||||
|
|
||||||
|
<ion-menu [content]="content" id="menu2">
|
||||||
|
|
||||||
|
<ion-toolbar danger>
|
||||||
|
<ion-title>Menu 2</ion-title>
|
||||||
|
</ion-toolbar>
|
||||||
|
|
||||||
|
<ion-content>
|
||||||
|
<ion-list>
|
||||||
|
<button ion-item menuClose="menu2" detail-none>
|
||||||
|
Close Menu 2
|
||||||
|
</button>
|
||||||
|
</ion-list>
|
||||||
|
</ion-content>
|
||||||
|
|
||||||
|
</ion-menu>
|
||||||
|
|
||||||
|
<ion-nav [root]="root" #content swipeBackEnabled="false"></ion-nav>
|
@ -1,9 +1,12 @@
|
|||||||
import {Component} from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {ionicBootstrap, MenuController} from 'ionic-angular';
|
|
||||||
|
import { ionicBootstrap, MenuController } from 'ionic-angular';
|
||||||
|
|
||||||
|
|
||||||
@Component({templateUrl: 'page1.html'})
|
@Component({
|
||||||
class Page1 {
|
templateUrl: 'main.html'
|
||||||
|
})
|
||||||
|
class ApiDemoPage {
|
||||||
activeMenu: string;
|
activeMenu: string;
|
||||||
|
|
||||||
constructor(public menu: MenuController) {
|
constructor(public menu: MenuController) {
|
||||||
@ -21,11 +24,12 @@ class Page1 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'app.html'
|
||||||
})
|
})
|
||||||
class ApiDemoApp {
|
class ApiDemoApp {
|
||||||
root = Page1;
|
root = ApiDemoPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
ionicBootstrap(ApiDemoApp);
|
ionicBootstrap(ApiDemoApp);
|
||||||
|
@ -1,34 +1,27 @@
|
|||||||
<ion-menu [content]="content" id="menu1">
|
<ion-header>
|
||||||
|
|
||||||
<ion-toolbar secondary>
|
<ion-navbar>
|
||||||
<ion-title>Menu 1</ion-title>
|
<button [menuToggle]="activeMenu">
|
||||||
</ion-toolbar>
|
<ion-icon name="menu"></ion-icon>
|
||||||
|
|
||||||
<ion-content>
|
|
||||||
<ion-list>
|
|
||||||
<button ion-item menuClose="menu1" detail-none>
|
|
||||||
Close Menu 1
|
|
||||||
</button>
|
</button>
|
||||||
</ion-list>
|
<ion-title>
|
||||||
</ion-content>
|
Menu
|
||||||
|
</ion-title>
|
||||||
|
</ion-navbar>
|
||||||
|
|
||||||
</ion-menu>
|
</ion-header>
|
||||||
|
|
||||||
|
|
||||||
<ion-menu [content]="content" id="menu2">
|
<ion-content padding>
|
||||||
|
|
||||||
<ion-toolbar danger>
|
<h4>Active Menu: <b primary>{{ (activeMenu == 'menu1') ? 'Menu 1' : 'Menu 2' }}</b></h4>
|
||||||
<ion-title>Menu 2</ion-title>
|
|
||||||
</ion-toolbar>
|
|
||||||
|
|
||||||
<ion-content>
|
<p>This page has two menus with different id's, but only one is active at a time.</p>
|
||||||
<ion-list>
|
|
||||||
<button ion-item menuClose="menu2" detail-none>
|
|
||||||
Close Menu 2
|
|
||||||
</button>
|
|
||||||
</ion-list>
|
|
||||||
</ion-content>
|
|
||||||
|
|
||||||
</ion-menu>
|
<button block secondary (click)="menu1Active()">Make Menu 1 Active</button>
|
||||||
|
|
||||||
<ion-nav [root]="root" #content swipeBackEnabled="false"></ion-nav>
|
<button block danger (click)="menu2Active()">Make Menu 2 Active</button>
|
||||||
|
|
||||||
|
<button block [menuToggle]="activeMenu">Toggle Menu</button>
|
||||||
|
|
||||||
|
</ion-content>
|
||||||
|
@ -1,27 +0,0 @@
|
|||||||
<ion-header>
|
|
||||||
|
|
||||||
<ion-navbar>
|
|
||||||
<button [menuToggle]="activeMenu">
|
|
||||||
<ion-icon name="menu"></ion-icon>
|
|
||||||
</button>
|
|
||||||
<ion-title>
|
|
||||||
Menu
|
|
||||||
</ion-title>
|
|
||||||
</ion-navbar>
|
|
||||||
|
|
||||||
</ion-header>
|
|
||||||
|
|
||||||
|
|
||||||
<ion-content padding>
|
|
||||||
|
|
||||||
<h4>Active Menu: <b primary>{{ (activeMenu == 'menu1') ? 'Menu 1' : 'Menu 2' }}</b></h4>
|
|
||||||
|
|
||||||
<p>This page has two menus with different id's, but only one is active at a time.</p>
|
|
||||||
|
|
||||||
<button block secondary (click)="menu1Active()">Make Menu 1 Active</button>
|
|
||||||
|
|
||||||
<button block danger (click)="menu2Active()">Make Menu 2 Active</button>
|
|
||||||
|
|
||||||
<button block [menuToggle]="activeMenu">Toggle Menu</button>
|
|
||||||
|
|
||||||
</ion-content>
|
|
@ -1 +0,0 @@
|
|||||||
<ion-nav [root]="root"></ion-nav>
|
|
@ -1,6 +1,6 @@
|
|||||||
import {Component} from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {ionicBootstrap, IonicApp, Config, Platform, ViewController} from 'ionic-angular';
|
|
||||||
import {Modal, NavController, NavParams, Animation} from 'ionic-angular';
|
import { Animation, Config, IonicApp, ionicBootstrap, Modal, NavController, NavParams, Platform, ViewController } from 'ionic-angular';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -27,6 +27,7 @@ export class ModalFirstPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: "modal-content.html"
|
templateUrl: "modal-content.html"
|
||||||
})
|
})
|
||||||
@ -48,7 +49,7 @@ export class ModalContentPage {
|
|||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'app.html'
|
template: '<ion-nav [root]="root"></ion-nav>'
|
||||||
})
|
})
|
||||||
class ApiDemoApp {
|
class ApiDemoApp {
|
||||||
root = ModalFirstPage;
|
root = ModalFirstPage;
|
||||||
|
@ -1 +0,0 @@
|
|||||||
<ion-nav [root]="root"></ion-nav>
|
|
@ -1,25 +1,26 @@
|
|||||||
import {Component} from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {ionicBootstrap, NavController, NavParams} from 'ionic-angular';
|
|
||||||
|
import { ionicBootstrap, NavController, NavParams } from 'ionic-angular';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'main.html'
|
||||||
})
|
})
|
||||||
export class InitialPage {
|
export class ApiDemoPage {
|
||||||
myParam = '';
|
myParam: string = '';
|
||||||
|
|
||||||
constructor(public nav: NavController) {}
|
constructor(public nav: NavController) {}
|
||||||
|
|
||||||
pushParams() {
|
pushParams() {
|
||||||
this.nav.push(Page2, { 'myParam': this.myParam });
|
this.nav.push(PushPage, { 'myParam': this.myParam });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: "page-2.html"
|
templateUrl: "page.html"
|
||||||
})
|
})
|
||||||
export class Page2 {
|
export class PushPage {
|
||||||
myParam: string;
|
myParam: string;
|
||||||
|
|
||||||
constructor(public nav: NavController, params: NavParams) {
|
constructor(public nav: NavController, params: NavParams) {
|
||||||
@ -29,10 +30,10 @@ export class Page2 {
|
|||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'app.html'
|
template: '<ion-nav [root]="root"></ion-nav>'
|
||||||
})
|
})
|
||||||
class ApiDemoApp {
|
class ApiDemoApp {
|
||||||
root = InitialPage;
|
root = ApiDemoPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
ionicBootstrap(ApiDemoApp);
|
ionicBootstrap(ApiDemoApp);
|
||||||
|
@ -1,15 +1,24 @@
|
|||||||
import {Component} from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {ionicBootstrap} from 'ionic-angular';
|
|
||||||
|
import { ionicBootstrap } from 'ionic-angular';
|
||||||
|
|
||||||
|
|
||||||
// Use the toolbar demo but pass in the demo name to change the title
|
// Use the toolbar demo but pass in the demo name to change the title
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: '../toolbar/main.html'
|
templateUrl: '../toolbar/main.html'
|
||||||
})
|
})
|
||||||
class ApiDemoApp {
|
class ApiDemoPage {
|
||||||
demo = "Navbar";
|
demo = "Navbar";
|
||||||
favorites = "recent";
|
favorites = "recent";
|
||||||
apps = "free";
|
apps = "free";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
template: '<ion-nav [root]="root"></ion-nav>'
|
||||||
|
})
|
||||||
|
class ApiDemoApp {
|
||||||
|
root = ApiDemoPage;
|
||||||
|
}
|
||||||
|
|
||||||
ionicBootstrap(ApiDemoApp);
|
ionicBootstrap(ApiDemoApp);
|
||||||
|
@ -1 +0,0 @@
|
|||||||
<ion-nav [root]="root"></ion-nav>
|
|
@ -1,5 +1,6 @@
|
|||||||
import {Component} from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {ionicBootstrap, Config, Platform, NavController, NavParams} from 'ionic-angular';
|
|
||||||
|
import { Config, ionicBootstrap, NavController, NavParams, Platform } from 'ionic-angular';
|
||||||
|
|
||||||
var PAGE_NUM = 2;
|
var PAGE_NUM = 2;
|
||||||
|
|
||||||
@ -7,25 +8,25 @@ var PAGE_NUM = 2;
|
|||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'main.html'
|
||||||
})
|
})
|
||||||
export class InitialPage {
|
export class ApiDemoPage {
|
||||||
constructor(public nav: NavController) {}
|
constructor(public nav: NavController) {}
|
||||||
|
|
||||||
push() {
|
push() {
|
||||||
this.nav.push(Page2);
|
this.nav.push(PushPage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: "page-2.html"
|
templateUrl: "page.html"
|
||||||
})
|
})
|
||||||
export class Page2 {
|
export class PushPage {
|
||||||
pageNum = PAGE_NUM;
|
pageNum = PAGE_NUM;
|
||||||
|
|
||||||
constructor(private nav: NavController) {}
|
constructor(private nav: NavController) {}
|
||||||
|
|
||||||
push() {
|
push() {
|
||||||
PAGE_NUM++;
|
PAGE_NUM++;
|
||||||
this.nav.push(Page2);
|
this.nav.push(PushPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
pop() {
|
pop() {
|
||||||
@ -38,10 +39,10 @@ export class Page2 {
|
|||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'app.html'
|
template: '<ion-nav [root]="root"></ion-nav>'
|
||||||
})
|
})
|
||||||
class ApiDemoApp {
|
class ApiDemoApp {
|
||||||
root = InitialPage;
|
root = ApiDemoPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
ionicBootstrap(ApiDemoApp);
|
ionicBootstrap(ApiDemoApp);
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
import {Component} from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {ionicBootstrap, Platform} from 'ionic-angular';
|
|
||||||
|
import { ionicBootstrap, Platform } from 'ionic-angular';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'main.html'
|
||||||
})
|
})
|
||||||
class ApiDemoApp {
|
class ApiDemoPage {
|
||||||
isIos: boolean;
|
isIos: boolean;
|
||||||
isAndroid: boolean;
|
isAndroid: boolean;
|
||||||
isWindows: boolean;
|
isWindows: boolean;
|
||||||
@ -17,4 +18,12 @@ class ApiDemoApp {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
template: '<ion-nav [root]="root"></ion-nav>'
|
||||||
|
})
|
||||||
|
class ApiDemoApp {
|
||||||
|
root = ApiDemoPage;
|
||||||
|
}
|
||||||
|
|
||||||
ionicBootstrap(ApiDemoApp);
|
ionicBootstrap(ApiDemoApp);
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<ion-header>
|
<ion-header>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-navbar>
|
||||||
<ion-title>Platform</ion-title>
|
<ion-title>Platform</ion-title>
|
||||||
</ion-toolbar>
|
</ion-navbar>
|
||||||
|
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import {Component, ViewChild, ElementRef, ViewEncapsulation} from '@angular/core';
|
import { Component, ElementRef, ViewChild, ViewEncapsulation } from '@angular/core';
|
||||||
import {ionicBootstrap, Popover, NavController, Content, NavParams} from 'ionic-angular';
|
|
||||||
|
import { Content, ionicBootstrap, NavController, NavParams, Popover } from 'ionic-angular';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -136,7 +137,7 @@ class PopoverRadioPage {
|
|||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'main.html'
|
||||||
})
|
})
|
||||||
class PopoverPage {
|
class ApiDemoPage {
|
||||||
@ViewChild('popoverContent', {read: ElementRef}) content: ElementRef;
|
@ViewChild('popoverContent', {read: ElementRef}) content: ElementRef;
|
||||||
@ViewChild('popoverText', {read: ElementRef}) text: ElementRef;
|
@ViewChild('popoverText', {read: ElementRef}) text: ElementRef;
|
||||||
|
|
||||||
@ -164,7 +165,7 @@ class PopoverPage {
|
|||||||
encapsulation: ViewEncapsulation.None
|
encapsulation: ViewEncapsulation.None
|
||||||
})
|
})
|
||||||
class ApiDemoApp {
|
class ApiDemoApp {
|
||||||
root = PopoverPage;
|
root = ApiDemoPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
ionicBootstrap(ApiDemoApp);
|
ionicBootstrap(ApiDemoApp);
|
||||||
|
@ -1,12 +1,21 @@
|
|||||||
import {Component} from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {ionicBootstrap} from 'ionic-angular';
|
|
||||||
|
import { ionicBootstrap } from 'ionic-angular';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'main.html'
|
||||||
})
|
})
|
||||||
class ApiDemoApp {
|
class ApiDemoPage {
|
||||||
isDisabled = true;
|
isDisabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
template: '<ion-nav [root]="root"></ion-nav>'
|
||||||
|
})
|
||||||
|
class ApiDemoApp {
|
||||||
|
root = ApiDemoPage;
|
||||||
|
}
|
||||||
|
|
||||||
ionicBootstrap(ApiDemoApp);
|
ionicBootstrap(ApiDemoApp);
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<ion-header>
|
<ion-header>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-navbar>
|
||||||
<ion-title>Radio</ion-title>
|
<ion-title>Radio</ion-title>
|
||||||
</ion-toolbar>
|
</ion-navbar>
|
||||||
|
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
import {Component} from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {ionicBootstrap} from 'ionic-angular';
|
|
||||||
|
import { ionicBootstrap } from 'ionic-angular';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'main.html'
|
||||||
})
|
})
|
||||||
class ApiDemoApp {
|
class ApiDemoPage {
|
||||||
brightness: number = 20;
|
brightness: number = 20;
|
||||||
saturation: number = 0;
|
saturation: number = 0;
|
||||||
warmth: number = 1300;
|
warmth: number = 1300;
|
||||||
@ -15,4 +16,12 @@ class ApiDemoApp {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
template: '<ion-nav [root]="root"></ion-nav>'
|
||||||
|
})
|
||||||
|
class ApiDemoApp {
|
||||||
|
root = ApiDemoPage;
|
||||||
|
}
|
||||||
|
|
||||||
ionicBootstrap(ApiDemoApp);
|
ionicBootstrap(ApiDemoApp);
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<ion-header>
|
<ion-header>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-navbar>
|
||||||
<ion-title>Range</ion-title>
|
<ion-title>Range</ion-title>
|
||||||
</ion-toolbar>
|
</ion-navbar>
|
||||||
|
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import {Component, Injectable} from '@angular/core';
|
import { Component, Injectable } from '@angular/core';
|
||||||
import {ionicBootstrap, Refresher} from 'ionic-angular';
|
|
||||||
|
import { ionicBootstrap, Refresher } from 'ionic-angular';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -67,7 +68,7 @@ export class MockProvider {
|
|||||||
templateUrl: 'main.html',
|
templateUrl: 'main.html',
|
||||||
providers: [MockProvider]
|
providers: [MockProvider]
|
||||||
})
|
})
|
||||||
class ApiDemoApp {
|
class ApiDemoPage {
|
||||||
items: string[];
|
items: string[];
|
||||||
|
|
||||||
constructor(private mockProvider: MockProvider) {
|
constructor(private mockProvider: MockProvider) {
|
||||||
@ -91,4 +92,12 @@ class ApiDemoApp {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
template: '<ion-nav [root]="root"></ion-nav>'
|
||||||
|
})
|
||||||
|
class ApiDemoApp {
|
||||||
|
root = ApiDemoPage;
|
||||||
|
}
|
||||||
|
|
||||||
ionicBootstrap(ApiDemoApp);
|
ionicBootstrap(ApiDemoApp);
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<ion-header>
|
<ion-header>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-navbar>
|
||||||
<ion-title>Refresher</ion-title>
|
<ion-title>Refresher</ion-title>
|
||||||
</ion-toolbar>
|
</ion-navbar>
|
||||||
|
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
@ -1,10 +1,19 @@
|
|||||||
import {Component} from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {ionicBootstrap} from 'ionic-angular';
|
|
||||||
|
import { ionicBootstrap } from 'ionic-angular';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'main.html'
|
||||||
})
|
})
|
||||||
class ApiDemoApp {}
|
class ApiDemoPage {}
|
||||||
|
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
template: '<ion-nav [root]="root"></ion-nav>'
|
||||||
|
})
|
||||||
|
class ApiDemoApp {
|
||||||
|
root = ApiDemoPage;
|
||||||
|
}
|
||||||
|
|
||||||
ionicBootstrap(ApiDemoApp);
|
ionicBootstrap(ApiDemoApp);
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<ion-header>
|
<ion-header>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-navbar>
|
||||||
<ion-title>Scroll</ion-title>
|
<ion-title>Scroll</ion-title>
|
||||||
</ion-toolbar>
|
</ion-navbar>
|
||||||
|
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
@ -1,10 +1,40 @@
|
|||||||
import {Component} from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {ionicBootstrap} from 'ionic-angular';
|
|
||||||
|
import { ionicBootstrap } from 'ionic-angular';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'main.html'
|
||||||
})
|
})
|
||||||
class ApiDemoApp {}
|
class ApiDemoPage {
|
||||||
|
items: Array<string>;
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
this.setItems();
|
||||||
|
}
|
||||||
|
|
||||||
|
setItems() {
|
||||||
|
this.items = ['Orange', 'Banana', 'Pear', 'Tomato', 'Grape', 'Apple', 'Cherries', 'Cranberries', 'Raspberries', 'Strawberries', 'Watermelon'];
|
||||||
|
}
|
||||||
|
|
||||||
|
filterItems(ev) {
|
||||||
|
this.setItems();
|
||||||
|
let val = ev.target.value;
|
||||||
|
|
||||||
|
if (val && val.trim() !== '') {
|
||||||
|
this.items = this.items.filter(function(item) {
|
||||||
|
return item.toLowerCase().includes(val.toLowerCase());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
template: '<ion-nav [root]="root"></ion-nav>'
|
||||||
|
})
|
||||||
|
class ApiDemoApp {
|
||||||
|
root = ApiDemoPage;
|
||||||
|
}
|
||||||
|
|
||||||
ionicBootstrap(ApiDemoApp);
|
ionicBootstrap(ApiDemoApp);
|
||||||
|
@ -1,38 +1,26 @@
|
|||||||
<ion-header>
|
<ion-header>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-navbar no-border-bottom>
|
||||||
<ion-title>Searchbar</ion-title>
|
<ion-title>Searchbar</ion-title>
|
||||||
</ion-toolbar>
|
</ion-navbar>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-toolbar no-border-top>
|
||||||
<ion-searchbar placeholder="Default Toolbar"></ion-searchbar>
|
<ion-searchbar placeholder="Filter Items" (ionInput)="filterItems($event)"></ion-searchbar>
|
||||||
</ion-toolbar>
|
|
||||||
|
|
||||||
<ion-toolbar primary>
|
|
||||||
<ion-searchbar placeholder="Primary Toolbar"></ion-searchbar>
|
|
||||||
</ion-toolbar>
|
|
||||||
|
|
||||||
<ion-toolbar secondary>
|
|
||||||
<ion-searchbar placeholder="Secondary Toolbar"></ion-searchbar>
|
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
|
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
<ion-content>
|
||||||
|
|
||||||
<ion-content class="searchbar-demo">
|
<ion-searchbar placeholder="Filter Items with Cancel" showCancelButton danger (ionInput)="filterItems($event)"></ion-searchbar>
|
||||||
|
|
||||||
<p padding-left padding-right>Searchbars can be placed in a toolbar or anywhere in the content.</p>
|
<p padding-left padding-right>Searchbars can be placed in a toolbar or anywhere in the content.</p>
|
||||||
|
|
||||||
<ion-searchbar placeholder="Default Searchbar"></ion-searchbar>
|
<ion-list>
|
||||||
<hr>
|
<ion-item *ngFor="let item of items">
|
||||||
|
{{ item }}
|
||||||
<ion-searchbar placeholder="Primary Searchbar" primary></ion-searchbar>
|
</ion-item>
|
||||||
<hr>
|
</ion-list>
|
||||||
|
|
||||||
<ion-searchbar placeholder="Secondary Searchbar" secondary></ion-searchbar>
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<ion-searchbar placeholder="Danger Searchbar" danger></ion-searchbar>
|
|
||||||
|
|
||||||
</ion-content>
|
</ion-content>
|
||||||
|
|
||||||
@ -40,14 +28,7 @@
|
|||||||
<ion-footer>
|
<ion-footer>
|
||||||
|
|
||||||
<ion-toolbar danger>
|
<ion-toolbar danger>
|
||||||
<ion-searchbar placeholder="Danger Toolbar"></ion-searchbar>
|
<ion-searchbar placeholder="Search" (ionInput)="filterItems($event)"></ion-searchbar>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
|
|
||||||
</ion-footer>
|
</ion-footer>
|
||||||
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.searchbar-demo hr {
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
import {Component} from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {ionicBootstrap} from 'ionic-angular';
|
|
||||||
|
import { ionicBootstrap } from 'ionic-angular';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'main.html'
|
||||||
})
|
})
|
||||||
class ApiDemoApp {
|
class ApiDemoPage {
|
||||||
appType = "paid";
|
appType = "paid";
|
||||||
safari = "links";
|
safari = "links";
|
||||||
news = "local";
|
news = "local";
|
||||||
@ -20,4 +21,12 @@ class ApiDemoApp {
|
|||||||
proxy = "auto";
|
proxy = "auto";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
template: '<ion-nav [root]="root"></ion-nav>'
|
||||||
|
})
|
||||||
|
class ApiDemoApp {
|
||||||
|
root = ApiDemoPage;
|
||||||
|
}
|
||||||
|
|
||||||
ionicBootstrap(ApiDemoApp);
|
ionicBootstrap(ApiDemoApp);
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<ion-header>
|
<ion-header>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-navbar>
|
||||||
<ion-title>Segment</ion-title>
|
<ion-title>Segment</ion-title>
|
||||||
</ion-toolbar>
|
</ion-navbar>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-toolbar no-border-top>
|
||||||
<ion-segment [(ngModel)]="appType">
|
<ion-segment [(ngModel)]="appType">
|
||||||
<ion-segment-button value="paid">
|
<ion-segment-button value="paid">
|
||||||
Paid
|
Paid
|
||||||
@ -18,7 +18,7 @@
|
|||||||
</ion-segment>
|
</ion-segment>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-toolbar no-border-top>
|
||||||
<ion-segment [(ngModel)]="news" secondary>
|
<ion-segment [(ngModel)]="news" secondary>
|
||||||
<ion-segment-button value="worldwide">
|
<ion-segment-button value="worldwide">
|
||||||
Worldwide
|
Worldwide
|
||||||
@ -32,7 +32,7 @@
|
|||||||
</ion-segment>
|
</ion-segment>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-toolbar no-border-top>
|
||||||
<ion-segment [(ngModel)]="safari" dark class="icon-segment-demo">
|
<ion-segment [(ngModel)]="safari" dark class="icon-segment-demo">
|
||||||
<ion-segment-button value="bookmarks">
|
<ion-segment-button value="bookmarks">
|
||||||
<ion-icon name="book"></ion-icon>
|
<ion-icon name="book"></ion-icon>
|
||||||
@ -46,7 +46,7 @@
|
|||||||
</ion-segment>
|
</ion-segment>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-toolbar no-border-top>
|
||||||
<ion-segment [(ngModel)]="favorites" danger>
|
<ion-segment [(ngModel)]="favorites" danger>
|
||||||
<ion-segment-button value="featured">
|
<ion-segment-button value="featured">
|
||||||
Featured
|
Featured
|
||||||
@ -102,7 +102,7 @@
|
|||||||
|
|
||||||
<ion-footer>
|
<ion-footer>
|
||||||
|
|
||||||
<ion-toolbar primary>
|
<ion-toolbar no-border-bottom primary>
|
||||||
<ion-segment [(ngModel)]="pet" light>
|
<ion-segment [(ngModel)]="pet" light>
|
||||||
<ion-segment-button value="puppies">
|
<ion-segment-button value="puppies">
|
||||||
Puppies
|
Puppies
|
||||||
@ -116,7 +116,7 @@
|
|||||||
</ion-segment>
|
</ion-segment>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
|
|
||||||
<ion-toolbar dark>
|
<ion-toolbar no-border-bottom dark>
|
||||||
<ion-segment [(ngModel)]="calendar" primary>
|
<ion-segment [(ngModel)]="calendar" primary>
|
||||||
<ion-segment-button value="list">
|
<ion-segment-button value="list">
|
||||||
List
|
List
|
||||||
@ -130,7 +130,7 @@
|
|||||||
</ion-segment>
|
</ion-segment>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
|
|
||||||
<ion-toolbar danger>
|
<ion-toolbar no-border-bottom danger>
|
||||||
<ion-segment [(ngModel)]="proxy" light>
|
<ion-segment [(ngModel)]="proxy" light>
|
||||||
<ion-segment-button value="off">
|
<ion-segment-button value="off">
|
||||||
Off
|
Off
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
import {Component} from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {ionicBootstrap} from 'ionic-angular';
|
|
||||||
|
import { ionicBootstrap } from 'ionic-angular';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'main.html'
|
||||||
})
|
})
|
||||||
class MainPage {
|
class ApiDemoPage {
|
||||||
gender: string;
|
gender: string;
|
||||||
gaming: string;
|
gaming: string;
|
||||||
toppings: Array<string>;
|
toppings: Array<string>;
|
||||||
@ -50,7 +51,7 @@ class MainPage {
|
|||||||
template: '<ion-nav [root]="root"></ion-nav>'
|
template: '<ion-nav [root]="root"></ion-nav>'
|
||||||
})
|
})
|
||||||
class ApiDemoApp {
|
class ApiDemoApp {
|
||||||
root = MainPage;
|
root = ApiDemoPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
ionicBootstrap(ApiDemoApp);
|
ionicBootstrap(ApiDemoApp);
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<ion-header>
|
<ion-header>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-navbar>
|
||||||
<ion-title>Select</ion-title>
|
<ion-title>Select</ion-title>
|
||||||
</ion-toolbar>
|
</ion-navbar>
|
||||||
|
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
@ -1,10 +1,19 @@
|
|||||||
import {Component} from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {ionicBootstrap} from 'ionic-angular';
|
|
||||||
|
import { ionicBootstrap } from 'ionic-angular';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'main.html'
|
||||||
})
|
})
|
||||||
class ApiDemoApp {}
|
class ApiDemoPage {}
|
||||||
|
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
template: '<ion-nav [root]="root"></ion-nav>'
|
||||||
|
})
|
||||||
|
class ApiDemoApp {
|
||||||
|
root = ApiDemoPage;
|
||||||
|
}
|
||||||
|
|
||||||
ionicBootstrap(ApiDemoApp);
|
ionicBootstrap(ApiDemoApp);
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<ion-header>
|
<ion-header>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-navbar>
|
||||||
<ion-title>ShowWhen</ion-title>
|
<ion-title>ShowWhen</ion-title>
|
||||||
</ion-toolbar>
|
</ion-navbar>
|
||||||
|
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
@ -1,10 +1,19 @@
|
|||||||
import {Component} from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {ionicBootstrap} from 'ionic-angular';
|
|
||||||
|
import { ionicBootstrap } from 'ionic-angular';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'main.html'
|
||||||
})
|
})
|
||||||
class ApiDemoApp {}
|
class ApiDemoPage {}
|
||||||
|
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
template: '<ion-nav [root]="root"></ion-nav>'
|
||||||
|
})
|
||||||
|
class ApiDemoApp {
|
||||||
|
root = ApiDemoPage;
|
||||||
|
}
|
||||||
|
|
||||||
ionicBootstrap(ApiDemoApp);
|
ionicBootstrap(ApiDemoApp);
|
||||||
|
@ -1,5 +1,12 @@
|
|||||||
import {Component, ViewEncapsulation} from '@angular/core';
|
import { Component, ViewEncapsulation } from '@angular/core';
|
||||||
import {ionicBootstrap} from 'ionic-angular';
|
|
||||||
|
import { ionicBootstrap } from 'ionic-angular';
|
||||||
|
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
template: 'tab',
|
||||||
|
})
|
||||||
|
class TabPage {}
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -7,6 +14,16 @@ import {ionicBootstrap} from 'ionic-angular';
|
|||||||
styleUrls: ['style.css'],
|
styleUrls: ['style.css'],
|
||||||
encapsulation: ViewEncapsulation.None
|
encapsulation: ViewEncapsulation.None
|
||||||
})
|
})
|
||||||
class ApiDemoApp {}
|
class ApiDemoPage {
|
||||||
|
root = TabPage;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
template: '<ion-nav [root]="root"></ion-nav>'
|
||||||
|
})
|
||||||
|
class ApiDemoApp {
|
||||||
|
root = ApiDemoPage;
|
||||||
|
}
|
||||||
|
|
||||||
ionicBootstrap(ApiDemoApp);
|
ionicBootstrap(ApiDemoApp);
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
<ion-header>
|
<ion-header>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-navbar>
|
||||||
<ion-title>Tabs</ion-title>
|
<ion-title>Tabs</ion-title>
|
||||||
</ion-toolbar>
|
</ion-navbar>
|
||||||
|
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
|
||||||
<ion-content>
|
<ion-content>
|
||||||
<!-- Text -->
|
<!-- Text -->
|
||||||
<ion-tabs no-navbar>
|
<ion-tabs>
|
||||||
<ion-tab tabTitle="Recents" [root]="root"></ion-tab>
|
<ion-tab tabTitle="Recents" [root]="root"></ion-tab>
|
||||||
<ion-tab tabTitle="Favorites" [root]="root" tabBadge="23"></ion-tab>
|
<ion-tab tabTitle="Favorites" [root]="root" tabBadge="23"></ion-tab>
|
||||||
<ion-tab tabTitle="Settings" [root]="root"></ion-tab>
|
<ion-tab tabTitle="Settings" [root]="root"></ion-tab>
|
||||||
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- Icons -->
|
<!-- Icons -->
|
||||||
<ion-tabs no-navbar selectedIndex="1" primary>
|
<ion-tabs selectedIndex="1" primary>
|
||||||
<ion-tab tabIcon="call" [root]="root"></ion-tab>
|
<ion-tab tabIcon="call" [root]="root"></ion-tab>
|
||||||
<ion-tab tabIcon="heart" [root]="root"></ion-tab>
|
<ion-tab tabIcon="heart" [root]="root"></ion-tab>
|
||||||
<ion-tab tabIcon="settings" [root]="root" tabBadge="2" tabBadgeStyle="danger"></ion-tab>
|
<ion-tab tabIcon="settings" [root]="root" tabBadge="2" tabBadgeStyle="danger"></ion-tab>
|
||||||
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- Icons on top of text -->
|
<!-- Icons on top of text -->
|
||||||
<ion-tabs no-navbar selectedIndex="2" secondary>
|
<ion-tabs selectedIndex="2" secondary>
|
||||||
<ion-tab tabTitle="Location" tabIcon="navigate" [root]="root"></ion-tab>
|
<ion-tab tabTitle="Location" tabIcon="navigate" [root]="root"></ion-tab>
|
||||||
<ion-tab tabTitle="Favorites" tabIcon="star" [root]="root" tabBadge="12" tabBadgeStyle="dark"></ion-tab>
|
<ion-tab tabTitle="Favorites" tabIcon="star" [root]="root" tabBadge="12" tabBadgeStyle="dark"></ion-tab>
|
||||||
<ion-tab tabTitle="Radio" tabIcon="musical-notes" [root]="root"></ion-tab>
|
<ion-tab tabTitle="Radio" tabIcon="musical-notes" [root]="root"></ion-tab>
|
||||||
@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- Icons below text -->
|
<!-- Icons below text -->
|
||||||
<ion-tabs tabbarLayout="icon-bottom" no-navbar selectedIndex="1" danger>
|
<ion-tabs tabbarLayout="icon-bottom" selectedIndex="1" danger>
|
||||||
<ion-tab tabTitle="Recents" tabIcon="call" [root]="root" tabBadge="47" tabBadgeStyle="light"></ion-tab>
|
<ion-tab tabTitle="Recents" tabIcon="call" [root]="root" tabBadge="47" tabBadgeStyle="light"></ion-tab>
|
||||||
<ion-tab tabTitle="Favorites" tabIcon="heart" [root]="root"></ion-tab>
|
<ion-tab tabTitle="Favorites" tabIcon="heart" [root]="root"></ion-tab>
|
||||||
<ion-tab tabTitle="Settings" tabIcon="settings" [root]="root"></ion-tab>
|
<ion-tab tabTitle="Settings" tabIcon="settings" [root]="root"></ion-tab>
|
||||||
@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- Icons right of text -->
|
<!-- Icons right of text -->
|
||||||
<ion-tabs tabbarLayout="icon-right" no-navbar selectedIndex="0" light>
|
<ion-tabs tabbarLayout="icon-right" selectedIndex="0" light>
|
||||||
<ion-tab tabTitle="Recents" tabIcon="call" [root]="root"></ion-tab>
|
<ion-tab tabTitle="Recents" tabIcon="call" [root]="root"></ion-tab>
|
||||||
<ion-tab tabTitle="Favorites" tabIcon="heart" [root]="root"></ion-tab>
|
<ion-tab tabTitle="Favorites" tabIcon="heart" [root]="root"></ion-tab>
|
||||||
<ion-tab tabTitle="Settings" tabIcon="settings" [root]="root" tabBadge="4" tabBadgeStyle="secondary"></ion-tab>
|
<ion-tab tabTitle="Settings" tabIcon="settings" [root]="root" tabBadge="4" tabBadgeStyle="secondary"></ion-tab>
|
||||||
@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- Icons left of text -->
|
<!-- Icons left of text -->
|
||||||
<ion-tabs tabbarLayout="icon-left" no-navbar dark>
|
<ion-tabs tabbarLayout="icon-left" dark>
|
||||||
<ion-tab tabTitle="Recents" tabIcon="call" [root]="root" tabBadge="1" tabBadgeStyle="danger"></ion-tab>
|
<ion-tab tabTitle="Recents" tabIcon="call" [root]="root" tabBadge="1" tabBadgeStyle="danger"></ion-tab>
|
||||||
<ion-tab tabTitle="Favorites" tabIcon="heart" [root]="root"></ion-tab>
|
<ion-tab tabTitle="Favorites" tabIcon="heart" [root]="root"></ion-tab>
|
||||||
<ion-tab tabTitle="Settings" tabIcon="settings" [root]="root"></ion-tab>
|
<ion-tab tabTitle="Settings" tabIcon="settings" [root]="root"></ion-tab>
|
||||||
@ -57,7 +57,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- No icons -->
|
<!-- No icons -->
|
||||||
<ion-tabs tabbarLayout="icon-hide" no-navbar>
|
<ion-tabs tabbarLayout="icon-hide">
|
||||||
<ion-tab tabTitle="Recents" tabIcon="call" [root]="root"></ion-tab>
|
<ion-tab tabTitle="Recents" tabIcon="call" [root]="root"></ion-tab>
|
||||||
<ion-tab tabTitle="Favorites" tabIcon="heart" [root]="root" tabBadge="61" tabBadgeStyle="dark"></ion-tab>
|
<ion-tab tabTitle="Favorites" tabIcon="heart" [root]="root" tabBadge="61" tabBadgeStyle="dark"></ion-tab>
|
||||||
<ion-tab tabTitle="Settings" tabIcon="settings" [root]="root"></ion-tab>
|
<ion-tab tabTitle="Settings" tabIcon="settings" [root]="root"></ion-tab>
|
||||||
@ -65,7 +65,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- No overflow text -->
|
<!-- No overflow text -->
|
||||||
<ion-tabs no-navbar primary>
|
<ion-tabs primary>
|
||||||
<ion-tab tabTitle="Indiana Jones and the Raiders of the Lost Ark" [root]="root"></ion-tab>
|
<ion-tab tabTitle="Indiana Jones and the Raiders of the Lost Ark" [root]="root"></ion-tab>
|
||||||
<ion-tab tabTitle="Indiana Jones and the Temple of Doom" [root]="root"></ion-tab>
|
<ion-tab tabTitle="Indiana Jones and the Temple of Doom" [root]="root"></ion-tab>
|
||||||
<ion-tab tabTitle="Indiana Jones and the Last Crusade" [root]="root"></ion-tab>
|
<ion-tab tabTitle="Indiana Jones and the Last Crusade" [root]="root"></ion-tab>
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
ion-tabs[no-navbar] {
|
ion-tabs {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
ion-tabs[no-navbar],
|
ion-tabs,
|
||||||
ion-tabs[no-navbar] ion-tabbar {
|
ion-tabs ion-tabbar {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: auto;
|
top: auto;
|
||||||
height: auto;
|
height: auto;
|
||||||
|
visibility: visible;
|
||||||
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,19 @@
|
|||||||
import {Component} from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {ionicBootstrap} from 'ionic-angular';
|
|
||||||
|
import { ionicBootstrap } from 'ionic-angular';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'main.html'
|
||||||
})
|
})
|
||||||
class ApiDemoApp {}
|
class ApiDemoPage {}
|
||||||
|
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
template: '<ion-nav [root]="root"></ion-nav>'
|
||||||
|
})
|
||||||
|
class ApiDemoApp {
|
||||||
|
root = ApiDemoPage;
|
||||||
|
}
|
||||||
|
|
||||||
ionicBootstrap(ApiDemoApp);
|
ionicBootstrap(ApiDemoApp);
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<ion-header>
|
<ion-header>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-navbar>
|
||||||
<ion-title>Textarea</ion-title>
|
<ion-title>Textarea</ion-title>
|
||||||
</ion-toolbar>
|
</ion-navbar>
|
||||||
|
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import {Component} from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {ionicBootstrap} from 'ionic-angular';
|
import { ionicBootstrap } from 'ionic-angular';
|
||||||
|
|
||||||
|
|
||||||
// Use the toolbar demo but pass in the demo name to change the title
|
// Use the toolbar demo but pass in the demo name to change the title
|
||||||
@ -7,10 +7,18 @@ import {ionicBootstrap} from 'ionic-angular';
|
|||||||
@Component({
|
@Component({
|
||||||
templateUrl: '../toolbar/main.html'
|
templateUrl: '../toolbar/main.html'
|
||||||
})
|
})
|
||||||
class ApiDemoApp {
|
class ApiDemoPage {
|
||||||
demo = "Title";
|
demo = "Title";
|
||||||
favorites = "recent";
|
favorites = "recent";
|
||||||
apps = "free";
|
apps = "free";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
template: '<ion-nav [root]="root"></ion-nav>'
|
||||||
|
})
|
||||||
|
class ApiDemoApp {
|
||||||
|
root = ApiDemoPage;
|
||||||
|
}
|
||||||
|
|
||||||
ionicBootstrap(ApiDemoApp);
|
ionicBootstrap(ApiDemoApp);
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
import {Component} from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {ionicBootstrap, Toast, NavController} from 'ionic-angular';
|
|
||||||
|
import { ionicBootstrap, NavController, Toast } from 'ionic-angular';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'main.html'
|
||||||
})
|
})
|
||||||
class ApiPage {
|
class ApiDemoPage {
|
||||||
constructor(private nav: NavController) { }
|
constructor(private nav: NavController) { }
|
||||||
|
|
||||||
showToast(position: string) {
|
showToast(position: string) {
|
||||||
@ -59,7 +60,7 @@ class ApiPage {
|
|||||||
template: '<ion-nav [root]="root"></ion-nav>'
|
template: '<ion-nav [root]="root"></ion-nav>'
|
||||||
})
|
})
|
||||||
class ApiDemoApp {
|
class ApiDemoApp {
|
||||||
root = ApiPage;
|
root = ApiDemoPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
ionicBootstrap(ApiDemoApp);
|
ionicBootstrap(ApiDemoApp);
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<ion-header>
|
<ion-header>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-navbar>
|
||||||
<ion-title>Toast</ion-title>
|
<ion-title>Toast</ion-title>
|
||||||
</ion-toolbar>
|
</ion-navbar>
|
||||||
|
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
import {Component} from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {ionicBootstrap} from 'ionic-angular';
|
|
||||||
|
import { ionicBootstrap } from 'ionic-angular';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'main.html'
|
||||||
})
|
})
|
||||||
class ApiDemoApp {
|
class ApiDemoPage {
|
||||||
data = {
|
data = {
|
||||||
frodo: true,
|
frodo: true,
|
||||||
sam: false,
|
sam: false,
|
||||||
@ -21,4 +22,12 @@ class ApiDemoApp {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
template: '<ion-nav [root]="root"></ion-nav>'
|
||||||
|
})
|
||||||
|
class ApiDemoApp {
|
||||||
|
root = ApiDemoPage;
|
||||||
|
}
|
||||||
|
|
||||||
ionicBootstrap(ApiDemoApp);
|
ionicBootstrap(ApiDemoApp);
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<ion-header>
|
<ion-header>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-navbar>
|
||||||
<ion-title>Toggle</ion-title>
|
<ion-title>Toggle</ion-title>
|
||||||
</ion-toolbar>
|
</ion-navbar>
|
||||||
|
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
@ -1,14 +1,23 @@
|
|||||||
import {Component} from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import {ionicBootstrap} from 'ionic-angular';
|
|
||||||
|
import { ionicBootstrap } from 'ionic-angular';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
templateUrl: 'main.html'
|
templateUrl: 'main.html'
|
||||||
})
|
})
|
||||||
class ApiDemoApp {
|
class ApiDemoPage {
|
||||||
demo = "Toolbar";
|
demo = "Toolbar";
|
||||||
favorites = "recent";
|
favorites = "recent";
|
||||||
apps = "free";
|
apps = "free";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
template: '<ion-nav [root]="root"></ion-nav>'
|
||||||
|
})
|
||||||
|
class ApiDemoApp {
|
||||||
|
root = ApiDemoPage;
|
||||||
|
}
|
||||||
|
|
||||||
ionicBootstrap(ApiDemoApp);
|
ionicBootstrap(ApiDemoApp);
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
<ion-header>
|
<ion-header>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-navbar>
|
||||||
<ion-title>{{demo}}</ion-title>
|
<ion-title>{{demo}}</ion-title>
|
||||||
</ion-toolbar>
|
</ion-navbar>
|
||||||
|
|
||||||
</ion-header>
|
</ion-header>
|
||||||
|
|
||||||
|
|
||||||
<ion-content>
|
<ion-content>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-toolbar no-border-top>
|
||||||
<ion-title>Long title that never ends. It just goes on and on my friend.</ion-title>
|
<ion-title>Long title that never ends. It just goes on and on my friend.</ion-title>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-toolbar no-border-top>
|
||||||
<ion-buttons start>
|
<ion-buttons start>
|
||||||
<button>
|
<button>
|
||||||
<ion-icon name="contact"></ion-icon>
|
<ion-icon name="contact"></ion-icon>
|
||||||
@ -30,7 +30,7 @@
|
|||||||
<ion-title>Default Buttons</ion-title>
|
<ion-title>Default Buttons</ion-title>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-toolbar no-border-top>
|
||||||
<ion-buttons start>
|
<ion-buttons start>
|
||||||
<button danger>
|
<button danger>
|
||||||
<ion-icon name="contact"></ion-icon>
|
<ion-icon name="contact"></ion-icon>
|
||||||
@ -47,7 +47,7 @@
|
|||||||
<ion-title>Colored Buttons</ion-title>
|
<ion-title>Colored Buttons</ion-title>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-toolbar no-border-top>
|
||||||
<ion-buttons start>
|
<ion-buttons start>
|
||||||
<button solid>
|
<button solid>
|
||||||
<ion-icon name="contact"></ion-icon>
|
<ion-icon name="contact"></ion-icon>
|
||||||
@ -62,7 +62,7 @@
|
|||||||
</ion-buttons>
|
</ion-buttons>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-toolbar no-border-top>
|
||||||
<ion-buttons start>
|
<ion-buttons start>
|
||||||
<button outline>
|
<button outline>
|
||||||
<ion-icon name="contact"></ion-icon>
|
<ion-icon name="contact"></ion-icon>
|
||||||
@ -77,21 +77,21 @@
|
|||||||
<ion-title>Outline</ion-title>
|
<ion-title>Outline</ion-title>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-toolbar no-border-top>
|
||||||
<button menuToggle>
|
<button menuToggle>
|
||||||
<ion-icon name="menu"></ion-icon>
|
<ion-icon name="menu"></ion-icon>
|
||||||
</button>
|
</button>
|
||||||
<ion-title>Left Menu</ion-title>
|
<ion-title>Left Menu</ion-title>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
|
|
||||||
<ion-toolbar>
|
<ion-toolbar no-border-top>
|
||||||
<ion-title>Right Menu</ion-title>
|
<ion-title>Right Menu</ion-title>
|
||||||
<button menuToggle right>
|
<button menuToggle right>
|
||||||
<ion-icon name="menu"></ion-icon>
|
<ion-icon name="menu"></ion-icon>
|
||||||
</button>
|
</button>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
|
|
||||||
<ion-toolbar *ngIf="demo != 'Title'">
|
<ion-toolbar no-border-top *ngIf="demo != 'Title'">
|
||||||
<ion-buttons end>
|
<ion-buttons end>
|
||||||
<button #button2 (click)="buttonClick(button2)">
|
<button #button2 (click)="buttonClick(button2)">
|
||||||
<ion-icon name="search"></ion-icon>
|
<ion-icon name="search"></ion-icon>
|
||||||
@ -107,7 +107,7 @@
|
|||||||
</ion-segment>
|
</ion-segment>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
|
|
||||||
<ion-toolbar *ngIf="demo != 'Title'">
|
<ion-toolbar no-border-top *ngIf="demo != 'Title'">
|
||||||
<ion-segment [(ngModel)]="apps">
|
<ion-segment [(ngModel)]="apps">
|
||||||
<ion-segment-button value="paid">
|
<ion-segment-button value="paid">
|
||||||
Paid
|
Paid
|
||||||
@ -121,11 +121,11 @@
|
|||||||
</ion-segment>
|
</ion-segment>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
|
|
||||||
<ion-toolbar *ngIf="demo != 'Title'">
|
<ion-toolbar no-border-top *ngIf="demo != 'Title'">
|
||||||
<ion-searchbar></ion-searchbar>
|
<ion-searchbar></ion-searchbar>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
|
|
||||||
<ion-toolbar primary *ngIf="demo != 'Title'">
|
<ion-toolbar no-border-top primary *ngIf="demo != 'Title'">
|
||||||
<ion-searchbar></ion-searchbar>
|
<ion-searchbar></ion-searchbar>
|
||||||
</ion-toolbar>
|
</ion-toolbar>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user