diff --git a/demos/action-sheet/app.html b/demos/action-sheet/app.html deleted file mode 100644 index 6734cd75a0..0000000000 --- a/demos/action-sheet/app.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/demos/action-sheet/index.ts b/demos/action-sheet/index.ts index 718486e4af..2c8c714838 100644 --- a/demos/action-sheet/index.ts +++ b/demos/action-sheet/index.ts @@ -1,11 +1,12 @@ -import {Component} from '@angular/core'; -import {ionicBootstrap, ActionSheet, NavController, Platform} from 'ionic-angular'; +import { Component } from '@angular/core'; + +import { ActionSheet, ionicBootstrap, NavController, Platform } from 'ionic-angular'; @Component({ templateUrl: 'main.html' }) -export class InitialPage { +export class ApiDemoPage { constructor(public nav: NavController, public platform: Platform) { } present() { @@ -58,10 +59,10 @@ export class InitialPage { @Component({ - templateUrl: 'app.html' + template: '' }) class ApiDemoApp { - root = InitialPage; + root = ApiDemoPage; } ionicBootstrap(ApiDemoApp); diff --git a/demos/alert/app.html b/demos/alert/app.html deleted file mode 100644 index 6734cd75a0..0000000000 --- a/demos/alert/app.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/demos/alert/index.ts b/demos/alert/index.ts index 4f4bc688f8..5c7c5e35e0 100644 --- a/demos/alert/index.ts +++ b/demos/alert/index.ts @@ -1,11 +1,12 @@ -import {Component} from '@angular/core'; -import {ionicBootstrap, Alert, NavController} from 'ionic-angular'; +import { Component } from '@angular/core'; + +import { Alert, ionicBootstrap, NavController } from 'ionic-angular'; @Component({ templateUrl: 'main.html' }) -export class InitialPage { +export class ApiDemoPage { testRadioOpen = false; testRadioResult: any; testCheckboxOpen = false; @@ -211,10 +212,10 @@ export class InitialPage { @Component({ - templateUrl: 'app.html' + template: '' }) class ApiDemoApp { - root = InitialPage; + root = ApiDemoPage; } ionicBootstrap(ApiDemoApp); diff --git a/demos/button/index.ts b/demos/button/index.ts index c40e1274f7..daf18e196d 100644 --- a/demos/button/index.ts +++ b/demos/button/index.ts @@ -1,10 +1,19 @@ -import {Component} from '@angular/core'; -import {ionicBootstrap} from 'ionic-angular'; +import { Component } from '@angular/core'; + +import { ionicBootstrap } from 'ionic-angular'; @Component({ templateUrl: 'main.html' }) -class ApiDemoApp {} +class ApiDemoPage {} + + +@Component({ + template: '' +}) +class ApiDemoApp { + root = ApiDemoPage; +} ionicBootstrap(ApiDemoApp); diff --git a/demos/button/main.html b/demos/button/main.html index b6ae83b3e5..8aa1df285e 100644 --- a/demos/button/main.html +++ b/demos/button/main.html @@ -1,8 +1,8 @@ - + Button - + diff --git a/demos/checkbox/index.ts b/demos/checkbox/index.ts index 83d10ded9c..fd9013eac9 100644 --- a/demos/checkbox/index.ts +++ b/demos/checkbox/index.ts @@ -1,11 +1,12 @@ -import {Component} from '@angular/core'; -import {ionicBootstrap} from 'ionic-angular'; +import { Component } from '@angular/core'; + +import { ionicBootstrap } from 'ionic-angular'; @Component({ templateUrl: 'main.html' }) -class ApiDemoApp { +class ApiDemoPage { data = { jon: true, @@ -23,4 +24,12 @@ class ApiDemoApp { } + +@Component({ + template: '' +}) +class ApiDemoApp { + root = ApiDemoPage; +} + ionicBootstrap(ApiDemoApp); diff --git a/demos/checkbox/main.html b/demos/checkbox/main.html index bb4caebdb4..77bfed6c63 100644 --- a/demos/checkbox/main.html +++ b/demos/checkbox/main.html @@ -1,8 +1,8 @@ - + Checkbox - + diff --git a/demos/config/index.ts b/demos/config/index.ts index 3c018fe909..6bea2e4da2 100644 --- a/demos/config/index.ts +++ b/demos/config/index.ts @@ -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) { @@ -74,14 +74,14 @@ if (window.localStorage.getItem('configDemo')) { templateUrl: 'tabs.html' }) export class TabPage { - tabOne = InitialPage; + tabOne = ApiDemoPage; } @Component({ templateUrl: 'main.html' }) -export class InitialPage { +export class ApiDemoPage { config: any; initialConfig: any; @@ -113,14 +113,14 @@ export class InitialPage { } push() { - this.nav.push(AnotherPage); + this.nav.push(PushPage); } } @Component({ templateUrl: 'page.html' }) -export class AnotherPage { +export class PushPage { constructor(public nav: NavController) {} pop() { diff --git a/demos/config/main.html b/demos/config/main.html index d7a4295e73..78580e8d08 100644 --- a/demos/config/main.html +++ b/demos/config/main.html @@ -46,14 +46,15 @@ +

Any config for your app should be passed as the third argument to ionicBootstrap.

+ -
@App({
-  config: {
-    backButtonIcon: "{{initialConfig.backButtonIcon}}"
-    iconMode: "{{initialConfig.iconMode}}"
-    tabbarPlacement: "{{initialConfig.tabbarPlacement}}"
-  }
-})
+
+ionicBootstrap(MyApp, [], {
+  backButtonIcon: "{{initialConfig.backButtonIcon}}"
+  iconMode: "{{initialConfig.iconMode}}"
+  tabbarPlacement: "{{initialConfig.tabbarPlacement}}"
+});
+ + + + + + + + Please Log In + + + + + + + + + + + + diff --git a/demos/events/index.ts b/demos/events/index.ts index 3b959de5ef..32d77c1da3 100644 --- a/demos/events/index.ts +++ b/demos/events/index.ts @@ -1,8 +1,11 @@ -import {Component, ViewChild} from '@angular/core'; -import {ionicBootstrap, Events, Nav} from 'ionic-angular'; +import { Component, ViewChild } from '@angular/core'; + +import { Events, ionicBootstrap, Nav } from 'ionic-angular'; -@Component({templateUrl: 'login.html'}) +@Component({ + templateUrl: 'login.html' +}) class Login { user = { name: "Administrator", @@ -17,7 +20,10 @@ class Login { } -@Component({templateUrl: 'logout.html'}) + +@Component({ + templateUrl: 'logout.html' +}) class Logout { constructor(private events: Events) {} @@ -26,18 +32,22 @@ class Logout { } } + @Component({ - templateUrl: 'main.html' + templateUrl: 'app.html' }) class ApiDemoApp { @ViewChild(Nav) nav: Nav; - rootView = Login; + root = Login; loggedIn = false; - pages = [ - { title: 'Logout', component: Logout, showLoggedIn: true }, - { title: 'Login', component: Login, showLoggedIn: false }, + loggedInPages = [ + { title: 'Logout', component: Logout } + ]; + + loggedOutPages = [ + { title: 'Login', component: Login } ]; constructor(private events: Events) { diff --git a/demos/events/login.html b/demos/events/login.html index 539d74a9ca..95a3b0f2cc 100644 --- a/demos/events/login.html +++ b/demos/events/login.html @@ -4,6 +4,7 @@ + Events @@ -12,7 +13,7 @@ - +

Login

Click the login button to use the credentials below. Then, toggle the menu to see the menu items change.

diff --git a/demos/events/logout.html b/demos/events/logout.html index 0d5c4ac07d..924c058216 100644 --- a/demos/events/logout.html +++ b/demos/events/logout.html @@ -1,15 +1,18 @@ + - - + + - - Events - - + + Events + + + + - +

Logout

Click the logout button to logout. Then, toggle the menu to see the menu items change.

diff --git a/demos/events/main.html b/demos/events/main.html deleted file mode 100644 index cc5f0d5b71..0000000000 --- a/demos/events/main.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - Left Menu - - - - - - - Welcome, Administrator! - - - - - - - - - - - - diff --git a/demos/hide-when/index.ts b/demos/hide-when/index.ts index c40e1274f7..daf18e196d 100644 --- a/demos/hide-when/index.ts +++ b/demos/hide-when/index.ts @@ -1,10 +1,19 @@ -import {Component} from '@angular/core'; -import {ionicBootstrap} from 'ionic-angular'; +import { Component } from '@angular/core'; + +import { ionicBootstrap } from 'ionic-angular'; @Component({ templateUrl: 'main.html' }) -class ApiDemoApp {} +class ApiDemoPage {} + + +@Component({ + template: '' +}) +class ApiDemoApp { + root = ApiDemoPage; +} ionicBootstrap(ApiDemoApp); diff --git a/demos/hide-when/main.html b/demos/hide-when/main.html index 2b0cc60e85..70590aa843 100644 --- a/demos/hide-when/main.html +++ b/demos/hide-when/main.html @@ -1,8 +1,8 @@ - + HideWhen - + diff --git a/demos/icon/index.ts b/demos/icon/index.ts index c40e1274f7..daf18e196d 100644 --- a/demos/icon/index.ts +++ b/demos/icon/index.ts @@ -1,10 +1,19 @@ -import {Component} from '@angular/core'; -import {ionicBootstrap} from 'ionic-angular'; +import { Component } from '@angular/core'; + +import { ionicBootstrap } from 'ionic-angular'; @Component({ templateUrl: 'main.html' }) -class ApiDemoApp {} +class ApiDemoPage {} + + +@Component({ + template: '' +}) +class ApiDemoApp { + root = ApiDemoPage; +} ionicBootstrap(ApiDemoApp); diff --git a/demos/icon/main.html b/demos/icon/main.html index 880b37c7f8..f244c33580 100644 --- a/demos/icon/main.html +++ b/demos/icon/main.html @@ -1,8 +1,8 @@ - + Icon - + diff --git a/demos/infinite-scroll/main.html b/demos/infinite-scroll/main.html index 9b5be159d8..94d3a1ffd0 100644 --- a/demos/infinite-scroll/main.html +++ b/demos/infinite-scroll/main.html @@ -1,8 +1,8 @@ - + Infinite Scroll - + diff --git a/demos/input/index.ts b/demos/input/index.ts index c40e1274f7..daf18e196d 100644 --- a/demos/input/index.ts +++ b/demos/input/index.ts @@ -1,10 +1,19 @@ -import {Component} from '@angular/core'; -import {ionicBootstrap} from 'ionic-angular'; +import { Component } from '@angular/core'; + +import { ionicBootstrap } from 'ionic-angular'; @Component({ templateUrl: 'main.html' }) -class ApiDemoApp {} +class ApiDemoPage {} + + +@Component({ + template: '' +}) +class ApiDemoApp { + root = ApiDemoPage; +} ionicBootstrap(ApiDemoApp); diff --git a/demos/input/main.html b/demos/input/main.html index afe16c577c..a6d42b1ced 100644 --- a/demos/input/main.html +++ b/demos/input/main.html @@ -1,8 +1,8 @@ - + Input - + diff --git a/demos/item-sliding/index.ts b/demos/item-sliding/index.ts index 1f8a6143df..2ab466b787 100644 --- a/demos/item-sliding/index.ts +++ b/demos/item-sliding/index.ts @@ -1,11 +1,12 @@ -import {Component} from '@angular/core'; -import {ionicBootstrap, ItemSliding, Toast, NavController} from 'ionic-angular'; +import { Component } from '@angular/core'; + +import { ionicBootstrap, ItemSliding, NavController, Toast } from 'ionic-angular'; @Component({ templateUrl: 'main.html' }) -class InitialPage { +class ApiDemoPage { chats: any[]; logins: any[]; @@ -89,7 +90,7 @@ class InitialPage { template: '' }) class ApiDemoApp { - root = InitialPage; + root = ApiDemoPage; } ionicBootstrap(ApiDemoApp); diff --git a/demos/item-sliding/main.html b/demos/item-sliding/main.html index 61536c8996..5dcd34ef35 100644 --- a/demos/item-sliding/main.html +++ b/demos/item-sliding/main.html @@ -1,8 +1,8 @@ - + Item Sliding - + diff --git a/demos/item/index.ts b/demos/item/index.ts index 3567cc0cfd..daf18e196d 100644 --- a/demos/item/index.ts +++ b/demos/item/index.ts @@ -2,12 +2,12 @@ import { Component } from '@angular/core'; import { ionicBootstrap } from 'ionic-angular'; + @Component({ templateUrl: 'main.html' }) -class ApiDemoPage { +class ApiDemoPage {} -} @Component({ template: '' diff --git a/demos/item/main.html b/demos/item/main.html index 56f7b70369..55878b652c 100644 --- a/demos/item/main.html +++ b/demos/item/main.html @@ -1,8 +1,8 @@ - + Item - + diff --git a/demos/label/index.ts b/demos/label/index.ts index c40e1274f7..daf18e196d 100644 --- a/demos/label/index.ts +++ b/demos/label/index.ts @@ -1,10 +1,19 @@ -import {Component} from '@angular/core'; -import {ionicBootstrap} from 'ionic-angular'; +import { Component } from '@angular/core'; + +import { ionicBootstrap } from 'ionic-angular'; @Component({ templateUrl: 'main.html' }) -class ApiDemoApp {} +class ApiDemoPage {} + + +@Component({ + template: '' +}) +class ApiDemoApp { + root = ApiDemoPage; +} ionicBootstrap(ApiDemoApp); diff --git a/demos/label/main.html b/demos/label/main.html index ae0e028aef..a982bfacce 100644 --- a/demos/label/main.html +++ b/demos/label/main.html @@ -1,8 +1,8 @@ - + Label - + diff --git a/demos/list/index.ts b/demos/list/index.ts index 3567cc0cfd..6719a61c6d 100644 --- a/demos/list/index.ts +++ b/demos/list/index.ts @@ -5,9 +5,8 @@ import { ionicBootstrap } from 'ionic-angular'; @Component({ templateUrl: 'main.html' }) -class ApiDemoPage { +class ApiDemoPage {} -} @Component({ template: '' diff --git a/demos/list/main.html b/demos/list/main.html index e0bfac895c..c6f242d3af 100644 --- a/demos/list/main.html +++ b/demos/list/main.html @@ -1,8 +1,8 @@ - + List - + diff --git a/demos/loading/index.ts b/demos/loading/index.ts index ad71e8d5c4..63cfb9819f 100644 --- a/demos/loading/index.ts +++ b/demos/loading/index.ts @@ -1,5 +1,6 @@ -import {Component, ViewEncapsulation} from '@angular/core'; -import {ionicBootstrap, Loading, NavController, Platform} from 'ionic-angular'; +import { Component, ViewEncapsulation } from '@angular/core'; + +import { ionicBootstrap, Loading, NavController, Platform } from 'ionic-angular'; @Component({ diff --git a/demos/loading/main.html b/demos/loading/main.html index af6f0a24a1..9ed65607c3 100644 --- a/demos/loading/main.html +++ b/demos/loading/main.html @@ -1,8 +1,8 @@ - + Loading - + @@ -65,4 +65,4 @@ - \ No newline at end of file + diff --git a/demos/local-storage/index.ts b/demos/local-storage/index.ts index 13396f33ee..21763d873f 100644 --- a/demos/local-storage/index.ts +++ b/demos/local-storage/index.ts @@ -1,10 +1,11 @@ -import {Component} from '@angular/core'; -import {ionicBootstrap, IonicApp, Config, Platform} from 'ionic-angular'; -import {Storage, LocalStorage} from 'ionic-angular'; -import {Pipe, PipeTransform, Injectable} from '@angular/core' +import { Component, Injectable, Pipe, PipeTransform } from '@angular/core'; + +import { Config, IonicApp, ionicBootstrap, LocalStorage, Platform, Storage } from 'ionic-angular'; -@Pipe({name: 'cleanLocalData'}) +@Pipe({ + name: 'cleanLocalData' +}) @Injectable() class CleanLocalDataPipe implements PipeTransform { validKeys: string[]; @@ -29,7 +30,7 @@ class CleanLocalDataPipe implements PipeTransform { templateUrl: 'main.html', pipes: [CleanLocalDataPipe] }) -class MainPage { +class ApiDemoPage { local: Storage; localStorageDemo: string; myItem: any; @@ -84,7 +85,7 @@ class MainPage { pipes: [CleanLocalDataPipe] }) class ApiDemoApp { - root = MainPage; + root = ApiDemoPage; } ionicBootstrap(ApiDemoApp); diff --git a/demos/local-storage/main.html b/demos/local-storage/main.html index 64b4f1d3ad..6f9d70b283 100644 --- a/demos/local-storage/main.html +++ b/demos/local-storage/main.html @@ -1,8 +1,8 @@ - + Local Storage - + diff --git a/demos/menu/app.html b/demos/menu/app.html new file mode 100644 index 0000000000..fc2abf25b7 --- /dev/null +++ b/demos/menu/app.html @@ -0,0 +1,34 @@ + + + + Menu 1 + + + + + + + + + + + + + + + Menu 2 + + + + + + + + + + + diff --git a/demos/menu/index.ts b/demos/menu/index.ts index 39c3b553a0..15cebfff21 100644 --- a/demos/menu/index.ts +++ b/demos/menu/index.ts @@ -1,9 +1,12 @@ -import {Component} from '@angular/core'; -import {ionicBootstrap, MenuController} from 'ionic-angular'; +import { Component } from '@angular/core'; + +import { ionicBootstrap, MenuController } from 'ionic-angular'; -@Component({templateUrl: 'page1.html'}) -class Page1 { +@Component({ + templateUrl: 'main.html' +}) +class ApiDemoPage { activeMenu: string; constructor(public menu: MenuController) { @@ -21,11 +24,12 @@ class Page1 { } } + @Component({ - templateUrl: 'main.html' + templateUrl: 'app.html' }) class ApiDemoApp { - root = Page1; + root = ApiDemoPage; } ionicBootstrap(ApiDemoApp); diff --git a/demos/menu/main.html b/demos/menu/main.html index fc2abf25b7..9195d7290b 100644 --- a/demos/menu/main.html +++ b/demos/menu/main.html @@ -1,34 +1,27 @@ - + - - Menu 1 - + + + + Menu + + - - - - - - - + - + - - Menu 2 - +

Active Menu: {{ (activeMenu == 'menu1') ? 'Menu 1' : 'Menu 2' }}

- - - - - +

This page has two menus with different id's, but only one is active at a time.

-
+ - + + + + +
diff --git a/demos/menu/page1.html b/demos/menu/page1.html deleted file mode 100644 index 9195d7290b..0000000000 --- a/demos/menu/page1.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - Menu - - - - - - - - -

Active Menu: {{ (activeMenu == 'menu1') ? 'Menu 1' : 'Menu 2' }}

- -

This page has two menus with different id's, but only one is active at a time.

- - - - - - - -
diff --git a/demos/modal/app.html b/demos/modal/app.html deleted file mode 100644 index 6734cd75a0..0000000000 --- a/demos/modal/app.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/demos/modal/index.ts b/demos/modal/index.ts index c5039e9def..fe81275fd8 100644 --- a/demos/modal/index.ts +++ b/demos/modal/index.ts @@ -1,6 +1,6 @@ -import {Component} from '@angular/core'; -import {ionicBootstrap, IonicApp, Config, Platform, ViewController} from 'ionic-angular'; -import {Modal, NavController, NavParams, Animation} from 'ionic-angular'; +import { Component } from '@angular/core'; + +import { Animation, Config, IonicApp, ionicBootstrap, Modal, NavController, NavParams, Platform, ViewController } from 'ionic-angular'; @Component({ @@ -27,6 +27,7 @@ export class ModalFirstPage { } } + @Component({ templateUrl: "modal-content.html" }) @@ -48,7 +49,7 @@ export class ModalContentPage { @Component({ - templateUrl: 'app.html' + template: '' }) class ApiDemoApp { root = ModalFirstPage; diff --git a/demos/nav-params/app.html b/demos/nav-params/app.html deleted file mode 100644 index 6734cd75a0..0000000000 --- a/demos/nav-params/app.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/demos/nav-params/index.ts b/demos/nav-params/index.ts index 32a61d1de9..25a5fbe754 100644 --- a/demos/nav-params/index.ts +++ b/demos/nav-params/index.ts @@ -1,25 +1,26 @@ -import {Component} from '@angular/core'; -import {ionicBootstrap, NavController, NavParams} from 'ionic-angular'; +import { Component } from '@angular/core'; + +import { ionicBootstrap, NavController, NavParams } from 'ionic-angular'; @Component({ templateUrl: 'main.html' }) -export class InitialPage { - myParam = ''; +export class ApiDemoPage { + myParam: string = ''; constructor(public nav: NavController) {} pushParams() { - this.nav.push(Page2, { 'myParam': this.myParam }); + this.nav.push(PushPage, { 'myParam': this.myParam }); } } @Component({ - templateUrl: "page-2.html" + templateUrl: "page.html" }) -export class Page2 { +export class PushPage { myParam: string; constructor(public nav: NavController, params: NavParams) { @@ -29,10 +30,10 @@ export class Page2 { @Component({ - templateUrl: 'app.html' + template: '' }) class ApiDemoApp { - root = InitialPage; + root = ApiDemoPage; } ionicBootstrap(ApiDemoApp); diff --git a/demos/nav-params/page-2.html b/demos/nav-params/page.html similarity index 100% rename from demos/nav-params/page-2.html rename to demos/nav-params/page.html diff --git a/demos/navbar/index.ts b/demos/navbar/index.ts index b6e18fcd5c..7c366c3018 100644 --- a/demos/navbar/index.ts +++ b/demos/navbar/index.ts @@ -1,15 +1,24 @@ -import {Component} from '@angular/core'; -import {ionicBootstrap} from 'ionic-angular'; +import { Component } from '@angular/core'; + +import { ionicBootstrap } from 'ionic-angular'; // Use the toolbar demo but pass in the demo name to change the title @Component({ templateUrl: '../toolbar/main.html' }) -class ApiDemoApp { +class ApiDemoPage { demo = "Navbar"; favorites = "recent"; apps = "free"; } + +@Component({ + template: '' +}) +class ApiDemoApp { + root = ApiDemoPage; +} + ionicBootstrap(ApiDemoApp); diff --git a/demos/navigation/app.html b/demos/navigation/app.html deleted file mode 100644 index 6734cd75a0..0000000000 --- a/demos/navigation/app.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/demos/navigation/index.ts b/demos/navigation/index.ts index 205e730694..ddc3539c9b 100644 --- a/demos/navigation/index.ts +++ b/demos/navigation/index.ts @@ -1,5 +1,6 @@ -import {Component} from '@angular/core'; -import {ionicBootstrap, Config, Platform, NavController, NavParams} from 'ionic-angular'; +import { Component } from '@angular/core'; + +import { Config, ionicBootstrap, NavController, NavParams, Platform } from 'ionic-angular'; var PAGE_NUM = 2; @@ -7,25 +8,25 @@ var PAGE_NUM = 2; @Component({ templateUrl: 'main.html' }) -export class InitialPage { +export class ApiDemoPage { constructor(public nav: NavController) {} push() { - this.nav.push(Page2); + this.nav.push(PushPage); } } @Component({ - templateUrl: "page-2.html" + templateUrl: "page.html" }) -export class Page2 { +export class PushPage { pageNum = PAGE_NUM; constructor(private nav: NavController) {} push() { PAGE_NUM++; - this.nav.push(Page2); + this.nav.push(PushPage); } pop() { @@ -38,10 +39,10 @@ export class Page2 { @Component({ - templateUrl: 'app.html' + template: '' }) class ApiDemoApp { - root = InitialPage; + root = ApiDemoPage; } ionicBootstrap(ApiDemoApp); diff --git a/demos/navigation/page-2.html b/demos/navigation/page.html similarity index 100% rename from demos/navigation/page-2.html rename to demos/navigation/page.html diff --git a/demos/platform/index.ts b/demos/platform/index.ts index dd23c2fc8c..ffc7205dc4 100644 --- a/demos/platform/index.ts +++ b/demos/platform/index.ts @@ -1,11 +1,12 @@ -import {Component} from '@angular/core'; -import {ionicBootstrap, Platform} from 'ionic-angular'; +import { Component } from '@angular/core'; + +import { ionicBootstrap, Platform } from 'ionic-angular'; @Component({ templateUrl: 'main.html' }) -class ApiDemoApp { +class ApiDemoPage { isIos: boolean; isAndroid: boolean; isWindows: boolean; @@ -17,4 +18,12 @@ class ApiDemoApp { } } + +@Component({ + template: '' +}) +class ApiDemoApp { + root = ApiDemoPage; +} + ionicBootstrap(ApiDemoApp); diff --git a/demos/platform/main.html b/demos/platform/main.html index 1b6574c178..99487a8077 100644 --- a/demos/platform/main.html +++ b/demos/platform/main.html @@ -1,8 +1,8 @@ - + Platform - + diff --git a/demos/popover/index.ts b/demos/popover/index.ts index ecb8adf5ce..6137c6fa50 100644 --- a/demos/popover/index.ts +++ b/demos/popover/index.ts @@ -1,5 +1,6 @@ -import {Component, ViewChild, ElementRef, ViewEncapsulation} from '@angular/core'; -import {ionicBootstrap, Popover, NavController, Content, NavParams} from 'ionic-angular'; +import { Component, ElementRef, ViewChild, ViewEncapsulation } from '@angular/core'; + +import { Content, ionicBootstrap, NavController, NavParams, Popover } from 'ionic-angular'; @Component({ @@ -136,7 +137,7 @@ class PopoverRadioPage { @Component({ templateUrl: 'main.html' }) -class PopoverPage { +class ApiDemoPage { @ViewChild('popoverContent', {read: ElementRef}) content: ElementRef; @ViewChild('popoverText', {read: ElementRef}) text: ElementRef; @@ -164,7 +165,7 @@ class PopoverPage { encapsulation: ViewEncapsulation.None }) class ApiDemoApp { - root = PopoverPage; + root = ApiDemoPage; } ionicBootstrap(ApiDemoApp); diff --git a/demos/radio/index.ts b/demos/radio/index.ts index efa9e76ee2..f96cfa819b 100644 --- a/demos/radio/index.ts +++ b/demos/radio/index.ts @@ -1,12 +1,21 @@ -import {Component} from '@angular/core'; -import {ionicBootstrap} from 'ionic-angular'; +import { Component } from '@angular/core'; + +import { ionicBootstrap } from 'ionic-angular'; @Component({ templateUrl: 'main.html' }) -class ApiDemoApp { +class ApiDemoPage { isDisabled = true; } + +@Component({ + template: '' +}) +class ApiDemoApp { + root = ApiDemoPage; +} + ionicBootstrap(ApiDemoApp); diff --git a/demos/radio/main.html b/demos/radio/main.html index a352925d23..7035e9ed49 100644 --- a/demos/radio/main.html +++ b/demos/radio/main.html @@ -1,8 +1,8 @@ - + Radio - + diff --git a/demos/range/index.ts b/demos/range/index.ts index c31b54cdbe..3a6c8ba732 100644 --- a/demos/range/index.ts +++ b/demos/range/index.ts @@ -1,10 +1,11 @@ -import {Component} from '@angular/core'; -import {ionicBootstrap} from 'ionic-angular'; +import { Component } from '@angular/core'; + +import { ionicBootstrap } from 'ionic-angular'; @Component({ templateUrl: 'main.html' }) -class ApiDemoApp { +class ApiDemoPage { brightness: number = 20; saturation: number = 0; warmth: number = 1300; @@ -15,4 +16,12 @@ class ApiDemoApp { } } + +@Component({ + template: '' +}) +class ApiDemoApp { + root = ApiDemoPage; +} + ionicBootstrap(ApiDemoApp); diff --git a/demos/range/main.html b/demos/range/main.html index 886b2741eb..15fe0e8cc0 100644 --- a/demos/range/main.html +++ b/demos/range/main.html @@ -1,8 +1,8 @@ - + Range - + diff --git a/demos/refresher/index.ts b/demos/refresher/index.ts index d71351f6ad..1961f1b7f4 100644 --- a/demos/refresher/index.ts +++ b/demos/refresher/index.ts @@ -1,5 +1,6 @@ -import {Component, Injectable} from '@angular/core'; -import {ionicBootstrap, Refresher} from 'ionic-angular'; +import { Component, Injectable } from '@angular/core'; + +import { ionicBootstrap, Refresher } from 'ionic-angular'; /** @@ -67,7 +68,7 @@ export class MockProvider { templateUrl: 'main.html', providers: [MockProvider] }) -class ApiDemoApp { +class ApiDemoPage { items: string[]; constructor(private mockProvider: MockProvider) { @@ -91,4 +92,12 @@ class ApiDemoApp { } } + +@Component({ + template: '' +}) +class ApiDemoApp { + root = ApiDemoPage; +} + ionicBootstrap(ApiDemoApp); diff --git a/demos/refresher/main.html b/demos/refresher/main.html index add4df7b7f..7fb601f9ab 100644 --- a/demos/refresher/main.html +++ b/demos/refresher/main.html @@ -1,8 +1,8 @@ - + Refresher - + diff --git a/demos/scroll/index.ts b/demos/scroll/index.ts index c40e1274f7..daf18e196d 100644 --- a/demos/scroll/index.ts +++ b/demos/scroll/index.ts @@ -1,10 +1,19 @@ -import {Component} from '@angular/core'; -import {ionicBootstrap} from 'ionic-angular'; +import { Component } from '@angular/core'; + +import { ionicBootstrap } from 'ionic-angular'; @Component({ templateUrl: 'main.html' }) -class ApiDemoApp {} +class ApiDemoPage {} + + +@Component({ + template: '' +}) +class ApiDemoApp { + root = ApiDemoPage; +} ionicBootstrap(ApiDemoApp); diff --git a/demos/scroll/main.html b/demos/scroll/main.html index 8796f28ec1..2dd100a51a 100644 --- a/demos/scroll/main.html +++ b/demos/scroll/main.html @@ -1,8 +1,8 @@ - + Scroll - + diff --git a/demos/searchbar/index.ts b/demos/searchbar/index.ts index c40e1274f7..7501abd83f 100644 --- a/demos/searchbar/index.ts +++ b/demos/searchbar/index.ts @@ -1,10 +1,40 @@ -import {Component} from '@angular/core'; -import {ionicBootstrap} from 'ionic-angular'; +import { Component } from '@angular/core'; + +import { ionicBootstrap } from 'ionic-angular'; @Component({ templateUrl: 'main.html' }) -class ApiDemoApp {} +class ApiDemoPage { + items: Array; + + 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: '' +}) +class ApiDemoApp { + root = ApiDemoPage; +} ionicBootstrap(ApiDemoApp); diff --git a/demos/searchbar/main.html b/demos/searchbar/main.html index 6f78dfcebb..2e1f2cb431 100644 --- a/demos/searchbar/main.html +++ b/demos/searchbar/main.html @@ -1,38 +1,26 @@ - + Searchbar - + - - - - - - - - - - + + + - +

Searchbars can be placed in a toolbar or anywhere in the content.

- -
- - -
- - -
- - + + + {{ item }} + +
@@ -40,14 +28,7 @@ - + - - - diff --git a/demos/segment/index.ts b/demos/segment/index.ts index 4bddc67148..f4303a87c0 100644 --- a/demos/segment/index.ts +++ b/demos/segment/index.ts @@ -1,11 +1,12 @@ -import {Component} from '@angular/core'; -import {ionicBootstrap} from 'ionic-angular'; +import { Component } from '@angular/core'; + +import { ionicBootstrap } from 'ionic-angular'; @Component({ templateUrl: 'main.html' }) -class ApiDemoApp { +class ApiDemoPage { appType = "paid"; safari = "links"; news = "local"; @@ -20,4 +21,12 @@ class ApiDemoApp { proxy = "auto"; } + +@Component({ + template: '' +}) +class ApiDemoApp { + root = ApiDemoPage; +} + ionicBootstrap(ApiDemoApp); diff --git a/demos/segment/main.html b/demos/segment/main.html index 8753f26c6e..79ecbd1521 100644 --- a/demos/segment/main.html +++ b/demos/segment/main.html @@ -1,10 +1,10 @@ - + Segment - + - + Paid @@ -18,7 +18,7 @@ - + Worldwide @@ -32,7 +32,7 @@ - + @@ -46,7 +46,7 @@ - + Featured @@ -102,7 +102,7 @@ - + Puppies @@ -116,7 +116,7 @@ - + List @@ -130,7 +130,7 @@ - + Off @@ -144,4 +144,4 @@ - \ No newline at end of file + diff --git a/demos/select/index.ts b/demos/select/index.ts index c6a4b2f3d2..92987f1bad 100644 --- a/demos/select/index.ts +++ b/demos/select/index.ts @@ -1,11 +1,12 @@ -import {Component} from '@angular/core'; -import {ionicBootstrap} from 'ionic-angular'; +import { Component } from '@angular/core'; + +import { ionicBootstrap } from 'ionic-angular'; @Component({ templateUrl: 'main.html' }) -class MainPage { +class ApiDemoPage { gender: string; gaming: string; toppings: Array; @@ -50,7 +51,7 @@ class MainPage { template: '' }) class ApiDemoApp { - root = MainPage; + root = ApiDemoPage; } ionicBootstrap(ApiDemoApp); diff --git a/demos/select/main.html b/demos/select/main.html index 710cd62ee9..8b0f62f7c9 100644 --- a/demos/select/main.html +++ b/demos/select/main.html @@ -1,8 +1,8 @@ - + Select - + diff --git a/demos/show-when/index.ts b/demos/show-when/index.ts index c40e1274f7..daf18e196d 100644 --- a/demos/show-when/index.ts +++ b/demos/show-when/index.ts @@ -1,10 +1,19 @@ -import {Component} from '@angular/core'; -import {ionicBootstrap} from 'ionic-angular'; +import { Component } from '@angular/core'; + +import { ionicBootstrap } from 'ionic-angular'; @Component({ templateUrl: 'main.html' }) -class ApiDemoApp {} +class ApiDemoPage {} + + +@Component({ + template: '' +}) +class ApiDemoApp { + root = ApiDemoPage; +} ionicBootstrap(ApiDemoApp); diff --git a/demos/show-when/main.html b/demos/show-when/main.html index c6c8f5d8ce..16e717785f 100644 --- a/demos/show-when/main.html +++ b/demos/show-when/main.html @@ -1,8 +1,8 @@ - + ShowWhen - + diff --git a/demos/slides/index.ts b/demos/slides/index.ts index c40e1274f7..daf18e196d 100644 --- a/demos/slides/index.ts +++ b/demos/slides/index.ts @@ -1,10 +1,19 @@ -import {Component} from '@angular/core'; -import {ionicBootstrap} from 'ionic-angular'; +import { Component } from '@angular/core'; + +import { ionicBootstrap } from 'ionic-angular'; @Component({ templateUrl: 'main.html' }) -class ApiDemoApp {} +class ApiDemoPage {} + + +@Component({ + template: '' +}) +class ApiDemoApp { + root = ApiDemoPage; +} ionicBootstrap(ApiDemoApp); diff --git a/demos/tabs/index.ts b/demos/tabs/index.ts index 6ce01fdd77..c4a75cb163 100644 --- a/demos/tabs/index.ts +++ b/demos/tabs/index.ts @@ -1,5 +1,12 @@ -import {Component, ViewEncapsulation} from '@angular/core'; -import {ionicBootstrap} from 'ionic-angular'; +import { Component, ViewEncapsulation } from '@angular/core'; + +import { ionicBootstrap } from 'ionic-angular'; + + +@Component({ + template: 'tab', +}) +class TabPage {} @Component({ @@ -7,6 +14,16 @@ import {ionicBootstrap} from 'ionic-angular'; styleUrls: ['style.css'], encapsulation: ViewEncapsulation.None }) -class ApiDemoApp {} +class ApiDemoPage { + root = TabPage; +} + + +@Component({ + template: '' +}) +class ApiDemoApp { + root = ApiDemoPage; +} ionicBootstrap(ApiDemoApp); diff --git a/demos/tabs/main.html b/demos/tabs/main.html index 28ab8fd2fd..c0fcab9a1a 100644 --- a/demos/tabs/main.html +++ b/demos/tabs/main.html @@ -1,15 +1,15 @@ - + Tabs - + - + @@ -17,7 +17,7 @@ - + @@ -25,7 +25,7 @@ - + @@ -33,7 +33,7 @@ - + @@ -41,7 +41,7 @@ - + @@ -49,7 +49,7 @@ - + @@ -57,7 +57,7 @@ - + @@ -65,7 +65,7 @@ - + diff --git a/demos/tabs/style.css b/demos/tabs/style.css index b070d0b2f3..4855a8f245 100644 --- a/demos/tabs/style.css +++ b/demos/tabs/style.css @@ -1,10 +1,12 @@ -ion-tabs[no-navbar] { +ion-tabs { margin-bottom: 20px; } -ion-tabs[no-navbar], -ion-tabs[no-navbar] ion-tabbar { +ion-tabs, +ion-tabs ion-tabbar { position: relative; top: auto; height: auto; + visibility: visible; + opacity: 1; } diff --git a/demos/textarea/index.ts b/demos/textarea/index.ts index c40e1274f7..daf18e196d 100644 --- a/demos/textarea/index.ts +++ b/demos/textarea/index.ts @@ -1,10 +1,19 @@ -import {Component} from '@angular/core'; -import {ionicBootstrap} from 'ionic-angular'; +import { Component } from '@angular/core'; + +import { ionicBootstrap } from 'ionic-angular'; @Component({ templateUrl: 'main.html' }) -class ApiDemoApp {} +class ApiDemoPage {} + + +@Component({ + template: '' +}) +class ApiDemoApp { + root = ApiDemoPage; +} ionicBootstrap(ApiDemoApp); diff --git a/demos/textarea/main.html b/demos/textarea/main.html index 350e665893..1d171fa641 100644 --- a/demos/textarea/main.html +++ b/demos/textarea/main.html @@ -1,8 +1,8 @@ - + Textarea - + diff --git a/demos/title/index.ts b/demos/title/index.ts index eed2bcd504..b95160a6cf 100644 --- a/demos/title/index.ts +++ b/demos/title/index.ts @@ -1,5 +1,5 @@ -import {Component} from '@angular/core'; -import {ionicBootstrap} from 'ionic-angular'; +import { Component } from '@angular/core'; +import { ionicBootstrap } from 'ionic-angular'; // Use the toolbar demo but pass in the demo name to change the title @@ -7,10 +7,18 @@ import {ionicBootstrap} from 'ionic-angular'; @Component({ templateUrl: '../toolbar/main.html' }) -class ApiDemoApp { +class ApiDemoPage { demo = "Title"; favorites = "recent"; apps = "free"; } + +@Component({ + template: '' +}) +class ApiDemoApp { + root = ApiDemoPage; +} + ionicBootstrap(ApiDemoApp); diff --git a/demos/toast/index.ts b/demos/toast/index.ts index e55a7962bc..ef11d01588 100644 --- a/demos/toast/index.ts +++ b/demos/toast/index.ts @@ -1,11 +1,12 @@ -import {Component} from '@angular/core'; -import {ionicBootstrap, Toast, NavController} from 'ionic-angular'; +import { Component } from '@angular/core'; + +import { ionicBootstrap, NavController, Toast } from 'ionic-angular'; @Component({ templateUrl: 'main.html' }) -class ApiPage { +class ApiDemoPage { constructor(private nav: NavController) { } showToast(position: string) { @@ -59,7 +60,7 @@ class ApiPage { template: '' }) class ApiDemoApp { - root = ApiPage; + root = ApiDemoPage; } ionicBootstrap(ApiDemoApp); diff --git a/demos/toast/main.html b/demos/toast/main.html index 57fd7b5777..be1c7e6f9d 100644 --- a/demos/toast/main.html +++ b/demos/toast/main.html @@ -1,8 +1,8 @@ - + Toast - + diff --git a/demos/toggle/index.ts b/demos/toggle/index.ts index 64d41e5232..1afc0b2d1a 100644 --- a/demos/toggle/index.ts +++ b/demos/toggle/index.ts @@ -1,11 +1,12 @@ -import {Component} from '@angular/core'; -import {ionicBootstrap} from 'ionic-angular'; +import { Component } from '@angular/core'; + +import { ionicBootstrap } from 'ionic-angular'; @Component({ templateUrl: 'main.html' }) -class ApiDemoApp { +class ApiDemoPage { data = { frodo: true, sam: false, @@ -21,4 +22,12 @@ class ApiDemoApp { }; } + +@Component({ + template: '' +}) +class ApiDemoApp { + root = ApiDemoPage; +} + ionicBootstrap(ApiDemoApp); diff --git a/demos/toggle/main.html b/demos/toggle/main.html index 0885dfd058..2b8f4bda48 100644 --- a/demos/toggle/main.html +++ b/demos/toggle/main.html @@ -1,8 +1,8 @@ - + Toggle - + diff --git a/demos/toolbar/index.ts b/demos/toolbar/index.ts index 3173e3a7bc..c9eda59f99 100644 --- a/demos/toolbar/index.ts +++ b/demos/toolbar/index.ts @@ -1,14 +1,23 @@ -import {Component} from '@angular/core'; -import {ionicBootstrap} from 'ionic-angular'; +import { Component } from '@angular/core'; + +import { ionicBootstrap } from 'ionic-angular'; @Component({ templateUrl: 'main.html' }) -class ApiDemoApp { +class ApiDemoPage { demo = "Toolbar"; favorites = "recent"; apps = "free"; } + +@Component({ + template: '' +}) +class ApiDemoApp { + root = ApiDemoPage; +} + ionicBootstrap(ApiDemoApp); diff --git a/demos/toolbar/main.html b/demos/toolbar/main.html index ab82e1de99..0f69ef0824 100644 --- a/demos/toolbar/main.html +++ b/demos/toolbar/main.html @@ -1,19 +1,19 @@ - + {{demo}} - + - + Long title that never ends. It just goes on and on my friend. - + Left Menu - + Right Menu - +