diff --git a/demos/action-sheet/index.ts b/demos/action-sheet/AppModule.ts
similarity index 79%
rename from demos/action-sheet/index.ts
rename to demos/action-sheet/AppModule.ts
index 45fd568410..4448135041 100644
--- a/demos/action-sheet/index.ts
+++ b/demos/action-sheet/AppModule.ts
@@ -1,6 +1,5 @@
-import { Component } from '@angular/core';
-
-import { ActionSheetController, ionicBootstrap, Platform } from 'ionic-angular';
+import { Component, NgModule } from '@angular/core';
+import { ActionSheetController, IonicModule, Platform } from 'ionic-angular';
@Component({
@@ -61,8 +60,21 @@ export class ApiDemoPage {
@Component({
template: ''
})
-class ApiDemoApp {
+export class ApiDemoApp {
root = ApiDemoPage;
}
-ionicBootstrap(ApiDemoApp);
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ ApiDemoPage
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
\ No newline at end of file
diff --git a/demos/alert/index.ts b/demos/alert/AppModule.ts
similarity index 92%
rename from demos/alert/index.ts
rename to demos/alert/AppModule.ts
index 93e23346d3..56e3cd4e6a 100644
--- a/demos/alert/index.ts
+++ b/demos/alert/AppModule.ts
@@ -1,6 +1,5 @@
-import { Component } from '@angular/core';
-
-import { AlertController, ionicBootstrap } from 'ionic-angular';
+import { Component, NgModule } from '@angular/core';
+import { IonicModule } from 'ionic-angular';
@Component({
@@ -214,8 +213,22 @@ export class ApiDemoPage {
@Component({
template: ''
})
-class ApiDemoApp {
+export class ApiDemoApp {
root = ApiDemoPage;
}
-ionicBootstrap(ApiDemoApp);
+
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ ApiDemoPage
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
\ No newline at end of file
diff --git a/demos/button/AppModule.ts b/demos/button/AppModule.ts
new file mode 100644
index 0000000000..2b671f155e
--- /dev/null
+++ b/demos/button/AppModule.ts
@@ -0,0 +1,31 @@
+import { Component, NgModule } from '@angular/core';
+import { IonicModule } from 'ionic-angular';
+
+
+@Component({
+ templateUrl: 'main.html'
+})
+export class ApiDemoPage {}
+
+
+@Component({
+ template: ''
+})
+export class ApiDemoApp {
+ root = ApiDemoPage;
+}
+
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ ApiDemoPage
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
\ No newline at end of file
diff --git a/demos/button/index.ts b/demos/button/index.ts
deleted file mode 100644
index daf18e196d..0000000000
--- a/demos/button/index.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { Component } from '@angular/core';
-
-import { ionicBootstrap } from 'ionic-angular';
-
-
-@Component({
- templateUrl: 'main.html'
-})
-class ApiDemoPage {}
-
-
-@Component({
- template: ''
-})
-class ApiDemoApp {
- root = ApiDemoPage;
-}
-
-ionicBootstrap(ApiDemoApp);
diff --git a/demos/checkbox/AppModule.ts b/demos/checkbox/AppModule.ts
new file mode 100644
index 0000000000..0075d9ed01
--- /dev/null
+++ b/demos/checkbox/AppModule.ts
@@ -0,0 +1,47 @@
+import { Component, NgModule } from '@angular/core';
+import { IonicModule } from 'ionic-angular';
+
+
+@Component({
+ templateUrl: 'main.html'
+})
+export class ApiDemoPage {
+
+ data = {
+ jon: true,
+ daenerys: true,
+ arya: false,
+ tyroin: false,
+ sansa: true,
+ khal: false,
+ cersei: true,
+ stannis: true,
+ petyr: false,
+ hodor: true,
+ catelyn: true
+ };
+
+}
+
+
+@Component({
+ template: ''
+})
+export class ApiDemoApp {
+ root = ApiDemoPage;
+}
+
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ ApiDemoPage
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
\ No newline at end of file
diff --git a/demos/checkbox/index.ts b/demos/checkbox/index.ts
deleted file mode 100644
index fd9013eac9..0000000000
--- a/demos/checkbox/index.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-import { Component } from '@angular/core';
-
-import { ionicBootstrap } from 'ionic-angular';
-
-
-@Component({
- templateUrl: 'main.html'
-})
-class ApiDemoPage {
-
- data = {
- jon: true,
- daenerys: true,
- arya: false,
- tyroin: false,
- sansa: true,
- khal: false,
- cersei: true,
- stannis: true,
- petyr: false,
- hodor: true,
- catelyn: true
- };
-
-}
-
-
-@Component({
- template: ''
-})
-class ApiDemoApp {
- root = ApiDemoPage;
-}
-
-ionicBootstrap(ApiDemoApp);
diff --git a/demos/config/index.ts b/demos/config/AppModule.ts
similarity index 89%
rename from demos/config/index.ts
rename to demos/config/AppModule.ts
index b8fb787773..1a00d31df6 100644
--- a/demos/config/index.ts
+++ b/demos/config/AppModule.ts
@@ -1,6 +1,6 @@
-import { Component } from '@angular/core';
+import { Component, NgModule } from '@angular/core';
-import { ionicBootstrap, IonicApp, Platform, NavController } from 'ionic-angular';
+import { IonicModule, IonicApp, Platform, NavController } from 'ionic-angular';
if (!window.localStorage) {
@@ -137,8 +137,24 @@ export class PushPage {
@Component({
template: ''
})
-class ApiDemoApp {
+export class ApiDemoApp {
root = TabPage;
}
-ionicBootstrap(ApiDemoApp, null, CONFIG_DEMO);
+
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ ApiDemoPage,
+ TabPage,
+ PushPage
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp, CONFIG_DEMO)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
\ No newline at end of file
diff --git a/demos/datetime/index.ts b/demos/datetime/AppModule.ts
similarity index 80%
rename from demos/datetime/index.ts
rename to demos/datetime/AppModule.ts
index dd05f60866..10913f1755 100644
--- a/demos/datetime/index.ts
+++ b/demos/datetime/AppModule.ts
@@ -1,12 +1,10 @@
-import { Component } from '@angular/core';
-
-import { ionicBootstrap } from 'ionic-angular';
-
+import { Component, NgModule } from '@angular/core';
+import { IonicModule } from 'ionic-angular';
@Component({
templateUrl: 'main.html'
})
-class ApiDemoPage {
+export class ApiDemoPage {
wwwReleased = '1991';
netscapeReleased = '1994-12-15T13:47:20.789';
operaReleased = '1995-04-15';
@@ -68,8 +66,21 @@ class ApiDemoPage {
@Component({
template: ''
})
-class ApiDemoApp {
+export class ApiDemoApp {
root = ApiDemoPage;
}
-ionicBootstrap(ApiDemoApp);
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ ApiDemoPage
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
\ No newline at end of file
diff --git a/demos/events/index.ts b/demos/events/AppModule.ts
similarity index 73%
rename from demos/events/index.ts
rename to demos/events/AppModule.ts
index 32d77c1da3..3829fba951 100644
--- a/demos/events/index.ts
+++ b/demos/events/AppModule.ts
@@ -1,12 +1,10 @@
-import { Component, ViewChild } from '@angular/core';
-
-import { Events, ionicBootstrap, Nav } from 'ionic-angular';
-
+import { Component, ViewChild, NgModule } from '@angular/core';
+import { Events, IonicModule, Nav } from 'ionic-angular';
@Component({
templateUrl: 'login.html'
})
-class Login {
+export class Login {
user = {
name: "Administrator",
username: "admin"
@@ -24,7 +22,7 @@ class Login {
@Component({
templateUrl: 'logout.html'
})
-class Logout {
+export class Logout {
constructor(private events: Events) {}
logout() {
@@ -36,7 +34,7 @@ class Logout {
@Component({
templateUrl: 'app.html'
})
-class ApiDemoApp {
+export class ApiDemoApp {
@ViewChild(Nav) nav: Nav;
root = Login;
@@ -72,4 +70,19 @@ class ApiDemoApp {
}
}
-ionicBootstrap(ApiDemoApp);
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ Logout,
+ Login
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ Logout,
+ Login
+ ]
+})
+export class AppModule {}
diff --git a/demos/hide-when/AppModule.ts b/demos/hide-when/AppModule.ts
new file mode 100644
index 0000000000..fb8b9538bc
--- /dev/null
+++ b/demos/hide-when/AppModule.ts
@@ -0,0 +1,31 @@
+import { Component, NgModule } from '@angular/core';
+import { IonicModule } from 'ionic-angular';
+
+
+@Component({
+ templateUrl: 'main.html'
+})
+export class ApiDemoPage {}
+
+
+@Component({
+ template: ''
+})
+export class ApiDemoApp {
+ root = ApiDemoPage;
+}
+
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ ApiDemoPage
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
diff --git a/demos/hide-when/index.ts b/demos/hide-when/index.ts
deleted file mode 100644
index daf18e196d..0000000000
--- a/demos/hide-when/index.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { Component } from '@angular/core';
-
-import { ionicBootstrap } from 'ionic-angular';
-
-
-@Component({
- templateUrl: 'main.html'
-})
-class ApiDemoPage {}
-
-
-@Component({
- template: ''
-})
-class ApiDemoApp {
- root = ApiDemoPage;
-}
-
-ionicBootstrap(ApiDemoApp);
diff --git a/demos/icon/AppModule.ts b/demos/icon/AppModule.ts
new file mode 100644
index 0000000000..fb8b9538bc
--- /dev/null
+++ b/demos/icon/AppModule.ts
@@ -0,0 +1,31 @@
+import { Component, NgModule } from '@angular/core';
+import { IonicModule } from 'ionic-angular';
+
+
+@Component({
+ templateUrl: 'main.html'
+})
+export class ApiDemoPage {}
+
+
+@Component({
+ template: ''
+})
+export class ApiDemoApp {
+ root = ApiDemoPage;
+}
+
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ ApiDemoPage
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
diff --git a/demos/icon/index.ts b/demos/icon/index.ts
deleted file mode 100644
index daf18e196d..0000000000
--- a/demos/icon/index.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { Component } from '@angular/core';
-
-import { ionicBootstrap } from 'ionic-angular';
-
-
-@Component({
- templateUrl: 'main.html'
-})
-class ApiDemoPage {}
-
-
-@Component({
- template: ''
-})
-class ApiDemoApp {
- root = ApiDemoPage;
-}
-
-ionicBootstrap(ApiDemoApp);
diff --git a/demos/infinite-scroll/index.ts b/demos/infinite-scroll/AppModule.ts
similarity index 81%
rename from demos/infinite-scroll/index.ts
rename to demos/infinite-scroll/AppModule.ts
index bbea129652..11c88de5d1 100644
--- a/demos/infinite-scroll/index.ts
+++ b/demos/infinite-scroll/AppModule.ts
@@ -1,6 +1,5 @@
-import { Component, Injectable } from '@angular/core';
-import { ionicBootstrap, InfiniteScroll } from 'ionic-angular';
-
+import { Component, NgModule, Injectable } from '@angular/core';
+import { IonicModule, InfiniteScroll } from 'ionic-angular';
/**
* Mock Data Access Object
@@ -67,7 +66,7 @@ export class MockProvider {
templateUrl: 'main.html',
providers: [MockProvider]
})
-class ApiDemoApp {
+export class ApiDemoApp {
items: string[];
constructor(private mockProvider: MockProvider) {
@@ -90,4 +89,17 @@ class ApiDemoApp {
}
-ionicBootstrap(ApiDemoApp);
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ MockProvider
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoApp
+ ]
+})
+export class AppModule {}
diff --git a/demos/input/AppModule.ts b/demos/input/AppModule.ts
new file mode 100644
index 0000000000..fb8b9538bc
--- /dev/null
+++ b/demos/input/AppModule.ts
@@ -0,0 +1,31 @@
+import { Component, NgModule } from '@angular/core';
+import { IonicModule } from 'ionic-angular';
+
+
+@Component({
+ templateUrl: 'main.html'
+})
+export class ApiDemoPage {}
+
+
+@Component({
+ template: ''
+})
+export class ApiDemoApp {
+ root = ApiDemoPage;
+}
+
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ ApiDemoPage
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
diff --git a/demos/input/index.ts b/demos/input/index.ts
deleted file mode 100644
index daf18e196d..0000000000
--- a/demos/input/index.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { Component } from '@angular/core';
-
-import { ionicBootstrap } from 'ionic-angular';
-
-
-@Component({
- templateUrl: 'main.html'
-})
-class ApiDemoPage {}
-
-
-@Component({
- template: ''
-})
-class ApiDemoApp {
- root = ApiDemoPage;
-}
-
-ionicBootstrap(ApiDemoApp);
diff --git a/demos/item-reorder/index.ts b/demos/item-reorder/AppModule.ts
similarity index 77%
rename from demos/item-reorder/index.ts
rename to demos/item-reorder/AppModule.ts
index e8bc6610d9..5d24c4219c 100644
--- a/demos/item-reorder/index.ts
+++ b/demos/item-reorder/AppModule.ts
@@ -1,12 +1,11 @@
-import { Component, ViewEncapsulation } from '@angular/core';
-
-import { ionicBootstrap, ItemSliding, NavController, Toast, reorderArray } from 'ionic-angular';
+import { Component, NgModule, ViewEncapsulation } from '@angular/core';
+import { IonicModule, ItemSliding, NavController, Toast, reorderArray } from 'ionic-angular';
@Component({
templateUrl: 'main.html',
encapsulation: ViewEncapsulation.None
})
-class ApiDemoPage {
+export class ApiDemoPage {
songs: any[];
editButton: string = 'Edit';
editing: boolean = false;
@@ -78,8 +77,21 @@ class ApiDemoPage {
@Component({
template: ''
})
-class ApiDemoApp {
+export class ApiDemoApp {
root = ApiDemoPage;
}
-ionicBootstrap(ApiDemoApp);
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ ApiDemoPage
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
\ No newline at end of file
diff --git a/demos/item-sliding/index.ts b/demos/item-sliding/AppModule.ts
similarity index 81%
rename from demos/item-sliding/index.ts
rename to demos/item-sliding/AppModule.ts
index e2d662a0b4..fdf8eebe6f 100644
--- a/demos/item-sliding/index.ts
+++ b/demos/item-sliding/AppModule.ts
@@ -1,13 +1,12 @@
-import { Component, ViewEncapsulation } from '@angular/core';
-
-import { ionicBootstrap, ItemSliding, ToastController } from 'ionic-angular';
+import { Component, NgModule, ViewEncapsulation } from '@angular/core';
+import { IonicModule, ItemSliding, ToastController } from 'ionic-angular';
@Component({
templateUrl: 'main.html',
encapsulation: ViewEncapsulation.None
})
-class ApiDemoPage {
+export class ApiDemoPage {
chats: any[];
logins: any[];
@@ -93,8 +92,21 @@ class ApiDemoPage {
@Component({
template: ''
})
-class ApiDemoApp {
+export class ApiDemoApp {
root = ApiDemoPage;
}
-ionicBootstrap(ApiDemoApp);
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ ApiDemoPage
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
diff --git a/demos/item/AppModule.ts b/demos/item/AppModule.ts
new file mode 100644
index 0000000000..fb8b9538bc
--- /dev/null
+++ b/demos/item/AppModule.ts
@@ -0,0 +1,31 @@
+import { Component, NgModule } from '@angular/core';
+import { IonicModule } from 'ionic-angular';
+
+
+@Component({
+ templateUrl: 'main.html'
+})
+export class ApiDemoPage {}
+
+
+@Component({
+ template: ''
+})
+export class ApiDemoApp {
+ root = ApiDemoPage;
+}
+
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ ApiDemoPage
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
diff --git a/demos/item/index.ts b/demos/item/index.ts
deleted file mode 100644
index daf18e196d..0000000000
--- a/demos/item/index.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { Component } from '@angular/core';
-
-import { ionicBootstrap } from 'ionic-angular';
-
-
-@Component({
- templateUrl: 'main.html'
-})
-class ApiDemoPage {}
-
-
-@Component({
- template: ''
-})
-class ApiDemoApp {
- root = ApiDemoPage;
-}
-
-ionicBootstrap(ApiDemoApp);
diff --git a/demos/label/AppModule.ts b/demos/label/AppModule.ts
new file mode 100644
index 0000000000..c86fdfc598
--- /dev/null
+++ b/demos/label/AppModule.ts
@@ -0,0 +1,32 @@
+import { Component, NgModule } from '@angular/core';
+
+import { IonicModule } from 'ionic-angular';
+
+
+@Component({
+ templateUrl: 'main.html'
+})
+export class ApiDemoPage {}
+
+
+@Component({
+ template: ''
+})
+export class ApiDemoApp {
+ root = ApiDemoPage;
+}
+
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ ApiDemoPage
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
diff --git a/demos/label/index.ts b/demos/label/index.ts
deleted file mode 100644
index daf18e196d..0000000000
--- a/demos/label/index.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { Component } from '@angular/core';
-
-import { ionicBootstrap } from 'ionic-angular';
-
-
-@Component({
- templateUrl: 'main.html'
-})
-class ApiDemoPage {}
-
-
-@Component({
- template: ''
-})
-class ApiDemoApp {
- root = ApiDemoPage;
-}
-
-ionicBootstrap(ApiDemoApp);
diff --git a/demos/list/AppModule.ts b/demos/list/AppModule.ts
new file mode 100644
index 0000000000..85adcb45d4
--- /dev/null
+++ b/demos/list/AppModule.ts
@@ -0,0 +1,31 @@
+import { Component, NgModule } from '@angular/core';
+
+import { IonicModule } from 'ionic-angular';
+
+@Component({
+ templateUrl: 'main.html'
+})
+export class ApiDemoPage {}
+
+
+@Component({
+ template: ''
+})
+export class ApiDemoApp {
+ root = ApiDemoPage;
+}
+
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ ApiDemoPage
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
diff --git a/demos/list/index.ts b/demos/list/index.ts
deleted file mode 100644
index 6719a61c6d..0000000000
--- a/demos/list/index.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { Component } from '@angular/core';
-
-import { ionicBootstrap } from 'ionic-angular';
-
-@Component({
- templateUrl: 'main.html'
-})
-class ApiDemoPage {}
-
-
-@Component({
- template: ''
-})
-class ApiDemoApp {
- root = ApiDemoPage;
-}
-
-ionicBootstrap(ApiDemoApp);
diff --git a/demos/loading/index.ts b/demos/loading/AppModule.ts
similarity index 86%
rename from demos/loading/index.ts
rename to demos/loading/AppModule.ts
index 390de92f58..a18d3422ef 100644
--- a/demos/loading/index.ts
+++ b/demos/loading/AppModule.ts
@@ -1,12 +1,12 @@
-import { Component, ViewEncapsulation } from '@angular/core';
+import { Component, NgModule, ViewEncapsulation } from '@angular/core';
-import { ionicBootstrap, LoadingController, NavController } from 'ionic-angular';
+import { IonicModule, LoadingController, NavController } from 'ionic-angular';
@Component({
templateUrl: 'main.html'
})
-class Page1 {
+export class Page1 {
constructor(public loadingCtrl: LoadingController, public navCtrl: NavController) {}
presentLoadingIos() {
@@ -120,7 +120,7 @@ class Page1 {
This is another page!
`
})
-class Page2 {}
+export class Page2 {}
@Component({
@@ -128,8 +128,23 @@ class Page2 {}
styleUrls: ['styles.css'],
encapsulation: ViewEncapsulation.None
})
-class ApiDemoApp {
+export class ApiDemoApp {
root = Page1;
}
-ionicBootstrap(ApiDemoApp);
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ Page1,
+ Page2
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ Page1,
+ Page2
+ ]
+})
+export class AppModule {}
diff --git a/demos/local-storage/index.ts b/demos/local-storage/AppModule.ts
similarity index 78%
rename from demos/local-storage/index.ts
rename to demos/local-storage/AppModule.ts
index 21763d873f..df93e0d6fb 100644
--- a/demos/local-storage/index.ts
+++ b/demos/local-storage/AppModule.ts
@@ -1,13 +1,13 @@
-import { Component, Injectable, Pipe, PipeTransform } from '@angular/core';
+import { Component, NgModule, Injectable, Pipe, PipeTransform } from '@angular/core';
-import { Config, IonicApp, ionicBootstrap, LocalStorage, Platform, Storage } from 'ionic-angular';
+import { Config, IonicModule, LocalStorage, Platform, Storage } from 'ionic-angular';
@Pipe({
name: 'cleanLocalData'
})
@Injectable()
-class CleanLocalDataPipe implements PipeTransform {
+export class CleanLocalDataPipe implements PipeTransform {
validKeys: string[];
output: any;
data: any;
@@ -30,7 +30,7 @@ class CleanLocalDataPipe implements PipeTransform {
templateUrl: 'main.html',
pipes: [CleanLocalDataPipe]
})
-class ApiDemoPage {
+export class ApiDemoPage {
local: Storage;
localStorageDemo: string;
myItem: any;
@@ -84,8 +84,22 @@ class ApiDemoPage {
template: '',
pipes: [CleanLocalDataPipe]
})
-class ApiDemoApp {
+export class ApiDemoApp {
root = ApiDemoPage;
}
-ionicBootstrap(ApiDemoApp);
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ ApiDemoPage,
+ CleanLocalDataPipe
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
diff --git a/demos/menu/index.ts b/demos/menu/AppModule.ts
similarity index 55%
rename from demos/menu/index.ts
rename to demos/menu/AppModule.ts
index 15cebfff21..00c194426a 100644
--- a/demos/menu/index.ts
+++ b/demos/menu/AppModule.ts
@@ -1,12 +1,12 @@
-import { Component } from '@angular/core';
+import { Component, NgModule } from '@angular/core';
-import { ionicBootstrap, MenuController } from 'ionic-angular';
+import { IonicModule, MenuController } from 'ionic-angular';
@Component({
templateUrl: 'main.html'
})
-class ApiDemoPage {
+export class ApiDemoPage {
activeMenu: string;
constructor(public menu: MenuController) {
@@ -28,8 +28,21 @@ class ApiDemoPage {
@Component({
templateUrl: 'app.html'
})
-class ApiDemoApp {
+export class ApiDemoApp {
root = ApiDemoPage;
}
-ionicBootstrap(ApiDemoApp);
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ ApiDemoPage
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
diff --git a/demos/modal/index.ts b/demos/modal/AppModule.ts
similarity index 70%
rename from demos/modal/index.ts
rename to demos/modal/AppModule.ts
index bf4e26339b..e3a803cdd7 100644
--- a/demos/modal/index.ts
+++ b/demos/modal/AppModule.ts
@@ -1,6 +1,6 @@
-import { Component } from '@angular/core';
+import { Component, NgModule } from '@angular/core';
-import { Animation, ionicBootstrap, ModalController, NavController, NavParams, ViewController } from 'ionic-angular';
+import { Animation, IonicModule, ModalController, NavController, NavParams, ViewController } from 'ionic-angular';
@Component({
@@ -50,14 +50,29 @@ export class ModalContentPage {
@Component({
template: ''
})
-class ApiDemoApp {
+export class ApiDemoApp {
root = ModalFirstPage;
}
-ionicBootstrap(ApiDemoApp);
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ ModalFirstPage,
+ ModalContentPage,
+ ApiDemoPage
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
-class FadeIn extends Animation {
+export class FadeIn extends Animation {
constructor(enteringView: ViewController, leavingView: ViewController) {
super(enteringView.pageRef());
this
@@ -65,19 +80,19 @@ class FadeIn extends Animation {
.duration(1000)
.fromTo('translateY', '0%', '0%')
.fromTo('opacity', 0, 1)
- .before.addClass('show-page');
+ .beforeAddClass('show-page');
}
}
Animation.register('my-fade-in', FadeIn);
-class FadeOut extends Animation {
+export class FadeOut extends Animation {
constructor(enteringView: ViewController, leavingView: ViewController) {
super(leavingView.pageRef());
this
.easing('ease')
.duration(500)
.fromTo('opacity', 1, 0)
- .before.addClass('show-page');
+ .beforeAddClass('show-page');
}
}
Animation.register('my-fade-out', FadeOut);
diff --git a/demos/nav-params/index.ts b/demos/nav-params/AppModule.ts
similarity index 56%
rename from demos/nav-params/index.ts
rename to demos/nav-params/AppModule.ts
index 061bcaf540..9456025f3e 100644
--- a/demos/nav-params/index.ts
+++ b/demos/nav-params/AppModule.ts
@@ -1,6 +1,6 @@
-import { Component } from '@angular/core';
+import { Component, NgModule } from '@angular/core';
-import { ionicBootstrap, NavController, NavParams } from 'ionic-angular';
+import { IonicModule, NavController, NavParams } from 'ionic-angular';
@Component({
@@ -32,8 +32,22 @@ export class PushPage {
@Component({
template: ''
})
-class ApiDemoApp {
+export class ApiDemoApp {
root = ApiDemoPage;
}
-ionicBootstrap(ApiDemoApp);
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ ApiDemoPage
+ PushPage
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
diff --git a/demos/navbar/AppModule.ts b/demos/navbar/AppModule.ts
new file mode 100644
index 0000000000..4d6d152e18
--- /dev/null
+++ b/demos/navbar/AppModule.ts
@@ -0,0 +1,35 @@
+import { Component, NgModule } from '@angular/core';
+import { IonicModule } from 'ionic-angular';
+
+// Use the toolbar demo but pass in the demo name to change the title
+@Component({
+ templateUrl: '../toolbar/main.html'
+})
+export class ApiDemoPage {
+ demo = "Navbar";
+ favorites = "recent";
+ apps = "free";
+}
+
+
+@Component({
+ template: ''
+})
+export class ApiDemoApp {
+ root = ApiDemoPage;
+}
+
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ ApiDemoPage
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
diff --git a/demos/navbar/index.ts b/demos/navbar/index.ts
deleted file mode 100644
index 7c366c3018..0000000000
--- a/demos/navbar/index.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-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 ApiDemoPage {
- demo = "Navbar";
- favorites = "recent";
- apps = "free";
-}
-
-
-@Component({
- template: ''
-})
-class ApiDemoApp {
- root = ApiDemoPage;
-}
-
-ionicBootstrap(ApiDemoApp);
diff --git a/demos/navigation/index.ts b/demos/navigation/AppModule.ts
similarity index 59%
rename from demos/navigation/index.ts
rename to demos/navigation/AppModule.ts
index 50cb296f84..07ad1f6055 100644
--- a/demos/navigation/index.ts
+++ b/demos/navigation/AppModule.ts
@@ -1,6 +1,5 @@
-import { Component } from '@angular/core';
-
-import { Config, ionicBootstrap, NavController, NavParams, Platform } from 'ionic-angular';
+import { Component, NgModule } from '@angular/core';
+import { Config, IonicModule, NavController, NavParams, Platform } from 'ionic-angular';
var PAGE_NUM = 2;
@@ -41,8 +40,22 @@ export class PushPage {
@Component({
template: ''
})
-class ApiDemoApp {
+export class ApiDemoApp {
root = ApiDemoPage;
}
-ionicBootstrap(ApiDemoApp);
+@NgModule({
+ declarations: [
+ PushPage,
+ ApiDemoApp,
+ ApiDemoPage
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
diff --git a/demos/platform/AppModule.ts b/demos/platform/AppModule.ts
new file mode 100644
index 0000000000..3a48694d4a
--- /dev/null
+++ b/demos/platform/AppModule.ts
@@ -0,0 +1,41 @@
+import { Component, NgModule } from '@angular/core';
+import { IonicModule, Platform } from 'ionic-angular';
+
+
+@Component({
+ templateUrl: 'main.html'
+})
+export class ApiDemoPage {
+ isIos: boolean;
+ isAndroid: boolean;
+ isWindows: boolean;
+
+ constructor(platform: Platform) {
+ this.isIos = platform.is('ios');
+ this.isAndroid = platform.is('android');
+ this.isWindows = platform.is('windows');
+ }
+}
+
+
+@Component({
+ template: ''
+})
+export class ApiDemoApp {
+ root = ApiDemoPage;
+}
+
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ ApiDemoPage
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
diff --git a/demos/platform/index.ts b/demos/platform/index.ts
deleted file mode 100644
index ffc7205dc4..0000000000
--- a/demos/platform/index.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import { Component } from '@angular/core';
-
-import { ionicBootstrap, Platform } from 'ionic-angular';
-
-
-@Component({
- templateUrl: 'main.html'
-})
-class ApiDemoPage {
- isIos: boolean;
- isAndroid: boolean;
- isWindows: boolean;
-
- constructor(platform: Platform) {
- this.isIos = platform.is('ios');
- this.isAndroid = platform.is('android');
- this.isWindows = platform.is('windows');
- }
-}
-
-
-@Component({
- template: ''
-})
-class ApiDemoApp {
- root = ApiDemoPage;
-}
-
-ionicBootstrap(ApiDemoApp);
diff --git a/demos/popover/index.ts b/demos/popover/AppModule.ts
similarity index 90%
rename from demos/popover/index.ts
rename to demos/popover/AppModule.ts
index 32caa02b57..4190cc2429 100644
--- a/demos/popover/index.ts
+++ b/demos/popover/AppModule.ts
@@ -1,6 +1,5 @@
-import { Component, ElementRef, ViewChild, ViewEncapsulation } from '@angular/core';
-
-import { ionicBootstrap, NavParams, PopoverController } from 'ionic-angular';
+import { Component, NgModule, ElementRef, ViewChild, ViewEncapsulation } from '@angular/core';
+import { IonicModule, NavParams, PopoverController } from 'ionic-angular';
@Component({
@@ -59,7 +58,7 @@ import { ionicBootstrap, NavParams, PopoverController } from 'ionic-angular';
`,
})
-class PopoverRadioPage {
+export class PopoverRadioPage {
background: string;
contentEle: any;
textEle: any;
@@ -137,7 +136,7 @@ class PopoverRadioPage {
@Component({
templateUrl: 'main.html'
})
-class ApiDemoPage {
+export class ApiDemoPage {
@ViewChild('popoverContent', {read: ElementRef}) content: ElementRef;
@ViewChild('popoverText', {read: ElementRef}) text: ElementRef;
@@ -162,8 +161,22 @@ class ApiDemoPage {
styleUrls: ['style.css'],
encapsulation: ViewEncapsulation.None
})
-class ApiDemoApp {
+export class ApiDemoApp {
root = ApiDemoPage;
}
-ionicBootstrap(ApiDemoApp);
+@NgModule({
+ declarations: [
+ PopoverRadioPage,
+ ApiDemoApp,
+ ApiDemoPage
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
diff --git a/demos/radio/AppModule.ts b/demos/radio/AppModule.ts
new file mode 100644
index 0000000000..c6173e0552
--- /dev/null
+++ b/demos/radio/AppModule.ts
@@ -0,0 +1,33 @@
+import { Component, NgModule } from '@angular/core';
+import { IonicModule } from 'ionic-angular';
+
+
+@Component({
+ templateUrl: 'main.html'
+})
+export class ApiDemoPage {
+ isDisabled = true;
+}
+
+
+@Component({
+ template: ''
+})
+export class ApiDemoApp {
+ root = ApiDemoPage;
+}
+
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ ApiDemoPage
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
diff --git a/demos/radio/index.ts b/demos/radio/index.ts
deleted file mode 100644
index f96cfa819b..0000000000
--- a/demos/radio/index.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { Component } from '@angular/core';
-
-import { ionicBootstrap } from 'ionic-angular';
-
-
-@Component({
- templateUrl: 'main.html'
-})
-class ApiDemoPage {
- isDisabled = true;
-}
-
-
-@Component({
- template: ''
-})
-class ApiDemoApp {
- root = ApiDemoPage;
-}
-
-ionicBootstrap(ApiDemoApp);
diff --git a/demos/range/AppModule.ts b/demos/range/AppModule.ts
new file mode 100644
index 0000000000..6dfcd6a04a
--- /dev/null
+++ b/demos/range/AppModule.ts
@@ -0,0 +1,39 @@
+import { Component, NgModule } from '@angular/core';
+import { IonicModule } from 'ionic-angular';
+
+@Component({
+ templateUrl: 'main.html'
+})
+export class ApiDemoPage {
+ brightness: number = 20;
+ saturation: number = 0;
+ warmth: number = 1300;
+ structure: any = {lower: 33, upper: 60};
+
+ onChange(ev) {
+ console.log("Changed", ev);
+ }
+}
+
+
+@Component({
+ template: ''
+})
+export class ApiDemoApp {
+ root = ApiDemoPage;
+}
+
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ ApiDemoPage
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
diff --git a/demos/range/index.ts b/demos/range/index.ts
deleted file mode 100644
index 3a6c8ba732..0000000000
--- a/demos/range/index.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import { Component } from '@angular/core';
-
-import { ionicBootstrap } from 'ionic-angular';
-
-@Component({
- templateUrl: 'main.html'
-})
-class ApiDemoPage {
- brightness: number = 20;
- saturation: number = 0;
- warmth: number = 1300;
- structure: any = {lower: 33, upper: 60};
-
- onChange(ev) {
- console.log("Changed", ev);
- }
-}
-
-
-@Component({
- template: ''
-})
-class ApiDemoApp {
- root = ApiDemoPage;
-}
-
-ionicBootstrap(ApiDemoApp);
diff --git a/demos/refresher/index.ts b/demos/refresher/AppModule.ts
similarity index 81%
rename from demos/refresher/index.ts
rename to demos/refresher/AppModule.ts
index 1961f1b7f4..59f8e100e3 100644
--- a/demos/refresher/index.ts
+++ b/demos/refresher/AppModule.ts
@@ -1,6 +1,6 @@
-import { Component, Injectable } from '@angular/core';
+import { Component, NgModule, Injectable } from '@angular/core';
-import { ionicBootstrap, Refresher } from 'ionic-angular';
+import { IonicModule, Refresher } from 'ionic-angular';
/**
@@ -68,7 +68,7 @@ export class MockProvider {
templateUrl: 'main.html',
providers: [MockProvider]
})
-class ApiDemoPage {
+export class ApiDemoPage {
items: string[];
constructor(private mockProvider: MockProvider) {
@@ -96,8 +96,22 @@ class ApiDemoPage {
@Component({
template: ''
})
-class ApiDemoApp {
+export class ApiDemoApp {
root = ApiDemoPage;
}
-ionicBootstrap(ApiDemoApp);
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ ApiDemoPage,
+ MockProvider
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
diff --git a/demos/scroll/AppModule.ts b/demos/scroll/AppModule.ts
new file mode 100644
index 0000000000..c86fdfc598
--- /dev/null
+++ b/demos/scroll/AppModule.ts
@@ -0,0 +1,32 @@
+import { Component, NgModule } from '@angular/core';
+
+import { IonicModule } from 'ionic-angular';
+
+
+@Component({
+ templateUrl: 'main.html'
+})
+export class ApiDemoPage {}
+
+
+@Component({
+ template: ''
+})
+export class ApiDemoApp {
+ root = ApiDemoPage;
+}
+
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ ApiDemoPage
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
diff --git a/demos/scroll/index.ts b/demos/scroll/index.ts
deleted file mode 100644
index daf18e196d..0000000000
--- a/demos/scroll/index.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { Component } from '@angular/core';
-
-import { ionicBootstrap } from 'ionic-angular';
-
-
-@Component({
- templateUrl: 'main.html'
-})
-class ApiDemoPage {}
-
-
-@Component({
- template: ''
-})
-class ApiDemoApp {
- root = ApiDemoPage;
-}
-
-ionicBootstrap(ApiDemoApp);
diff --git a/demos/scrollbar-fix.css b/demos/scrollbar-fix.css
index dd56aaad3f..abbe7521c2 100644
--- a/demos/scrollbar-fix.css
+++ b/demos/scrollbar-fix.css
@@ -1,6 +1,6 @@
-body.has-scrollbar scroll-content {
+body.has-scrollbar .scroll-content {
margin-right: -15px;
}
-body.has-scrollbar ion-menu scroll-content {
+body.has-scrollbar ion-menu .scroll-content {
margin-right: 0;
}
\ No newline at end of file
diff --git a/demos/searchbar/index.ts b/demos/searchbar/AppModule.ts
similarity index 62%
rename from demos/searchbar/index.ts
rename to demos/searchbar/AppModule.ts
index 7501abd83f..c20d84e686 100644
--- a/demos/searchbar/index.ts
+++ b/demos/searchbar/AppModule.ts
@@ -1,12 +1,12 @@
-import { Component } from '@angular/core';
+import { Component, NgModule } from '@angular/core';
-import { ionicBootstrap } from 'ionic-angular';
+import { IonicModule } from 'ionic-angular';
@Component({
templateUrl: 'main.html'
})
-class ApiDemoPage {
+export class ApiDemoPage {
items: Array;
ngOnInit() {
@@ -33,8 +33,21 @@ class ApiDemoPage {
@Component({
template: ''
})
-class ApiDemoApp {
+export class ApiDemoApp {
root = ApiDemoPage;
}
-ionicBootstrap(ApiDemoApp);
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ ApiDemoPage
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
diff --git a/demos/segment/index.ts b/demos/segment/AppModule.ts
similarity index 78%
rename from demos/segment/index.ts
rename to demos/segment/AppModule.ts
index b2aa44ac4c..9d7c558854 100644
--- a/demos/segment/index.ts
+++ b/demos/segment/AppModule.ts
@@ -1,12 +1,12 @@
-import { Component } from '@angular/core';
+import { Component, NgModule } from '@angular/core';
-import { ionicBootstrap } from 'ionic-angular';
+import { IonicModule } from 'ionic-angular';
@Component({
templateUrl: 'main.html'
})
-class ApiDemoPage {
+export class ApiDemoPage {
appType = "Paid";
safari = "Shared Links";
weather = "sunny";
@@ -90,8 +90,21 @@ class ApiDemoPage {
@Component({
template: ''
})
-class ApiDemoApp {
+export class ApiDemoApp {
root = ApiDemoPage;
}
-ionicBootstrap(ApiDemoApp);
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ ApiDemoPage
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {});
diff --git a/demos/select/index.ts b/demos/select/AppModule.ts
similarity index 70%
rename from demos/select/index.ts
rename to demos/select/AppModule.ts
index 92987f1bad..e2a9f19ead 100644
--- a/demos/select/index.ts
+++ b/demos/select/AppModule.ts
@@ -1,12 +1,10 @@
-import { Component } from '@angular/core';
-
-import { ionicBootstrap } from 'ionic-angular';
-
+import { Component, NgModule } from '@angular/core';
+import { IonicModule } from 'ionic-angular';
@Component({
templateUrl: 'main.html'
})
-class ApiDemoPage {
+export class ApiDemoPage {
gender: string;
gaming: string;
toppings: Array;
@@ -50,8 +48,21 @@ class ApiDemoPage {
@Component({
template: ''
})
-class ApiDemoApp {
+export class ApiDemoApp {
root = ApiDemoPage;
}
-ionicBootstrap(ApiDemoApp);
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ ApiDemoPage
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
diff --git a/demos/show-when/AppModule.ts b/demos/show-when/AppModule.ts
new file mode 100644
index 0000000000..e1d485cf11
--- /dev/null
+++ b/demos/show-when/AppModule.ts
@@ -0,0 +1,30 @@
+import { Component, NgModule } from '@angular/core';
+import { IonicModule } from 'ionic-angular';
+
+@Component({
+ templateUrl: 'main.html'
+})
+export class ApiDemoPage {}
+
+
+@Component({
+ template: ''
+})
+export class ApiDemoApp {
+ root = ApiDemoPage;
+}
+
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ ApiDemoPage
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
diff --git a/demos/show-when/index.ts b/demos/show-when/index.ts
deleted file mode 100644
index daf18e196d..0000000000
--- a/demos/show-when/index.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { Component } from '@angular/core';
-
-import { ionicBootstrap } from 'ionic-angular';
-
-
-@Component({
- templateUrl: 'main.html'
-})
-class ApiDemoPage {}
-
-
-@Component({
- template: ''
-})
-class ApiDemoApp {
- root = ApiDemoPage;
-}
-
-ionicBootstrap(ApiDemoApp);
diff --git a/demos/slides/AppModule.ts b/demos/slides/AppModule.ts
new file mode 100644
index 0000000000..e1d485cf11
--- /dev/null
+++ b/demos/slides/AppModule.ts
@@ -0,0 +1,30 @@
+import { Component, NgModule } from '@angular/core';
+import { IonicModule } from 'ionic-angular';
+
+@Component({
+ templateUrl: 'main.html'
+})
+export class ApiDemoPage {}
+
+
+@Component({
+ template: ''
+})
+export class ApiDemoApp {
+ root = ApiDemoPage;
+}
+
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ ApiDemoPage
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
diff --git a/demos/slides/index.ts b/demos/slides/index.ts
deleted file mode 100644
index daf18e196d..0000000000
--- a/demos/slides/index.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { Component } from '@angular/core';
-
-import { ionicBootstrap } from 'ionic-angular';
-
-
-@Component({
- templateUrl: 'main.html'
-})
-class ApiDemoPage {}
-
-
-@Component({
- template: ''
-})
-class ApiDemoApp {
- root = ApiDemoPage;
-}
-
-ionicBootstrap(ApiDemoApp);
diff --git a/demos/tabs/AppModule.ts b/demos/tabs/AppModule.ts
new file mode 100644
index 0000000000..830c6ab4d5
--- /dev/null
+++ b/demos/tabs/AppModule.ts
@@ -0,0 +1,41 @@
+import { Component, NgModule, ViewEncapsulation } from '@angular/core';
+import { IonicModule } from 'ionic-angular';
+
+@Component({
+ template: 'tab',
+})
+export class TabPage {}
+
+
+@Component({
+ templateUrl: 'main.html',
+ styleUrls: ['style.css'],
+ encapsulation: ViewEncapsulation.None
+})
+export class ApiDemoPage {
+ root = TabPage;
+}
+
+
+@Component({
+ template: ''
+})
+export class ApiDemoApp {
+ root = ApiDemoPage;
+}
+
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ ApiDemoPage,
+ TabPage
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
diff --git a/demos/tabs/index.ts b/demos/tabs/index.ts
deleted file mode 100644
index c4a75cb163..0000000000
--- a/demos/tabs/index.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import { Component, ViewEncapsulation } from '@angular/core';
-
-import { ionicBootstrap } from 'ionic-angular';
-
-
-@Component({
- template: 'tab',
-})
-class TabPage {}
-
-
-@Component({
- templateUrl: 'main.html',
- styleUrls: ['style.css'],
- encapsulation: ViewEncapsulation.None
-})
-class ApiDemoPage {
- root = TabPage;
-}
-
-
-@Component({
- template: ''
-})
-class ApiDemoApp {
- root = ApiDemoPage;
-}
-
-ionicBootstrap(ApiDemoApp);
diff --git a/demos/tabs/style.css b/demos/tabs/style.css
index 3be3f2f680..defb7410ee 100644
--- a/demos/tabs/style.css
+++ b/demos/tabs/style.css
@@ -7,7 +7,7 @@ ion-tabs {
}
ion-tabs,
-ion-tabs ion-tabbar {
+ion-tabs .tabbar {
position: relative;
top: auto;
height: auto;
diff --git a/demos/textarea/AppModule.ts b/demos/textarea/AppModule.ts
new file mode 100644
index 0000000000..e1d485cf11
--- /dev/null
+++ b/demos/textarea/AppModule.ts
@@ -0,0 +1,30 @@
+import { Component, NgModule } from '@angular/core';
+import { IonicModule } from 'ionic-angular';
+
+@Component({
+ templateUrl: 'main.html'
+})
+export class ApiDemoPage {}
+
+
+@Component({
+ template: ''
+})
+export class ApiDemoApp {
+ root = ApiDemoPage;
+}
+
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ ApiDemoPage
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
diff --git a/demos/textarea/index.ts b/demos/textarea/index.ts
deleted file mode 100644
index daf18e196d..0000000000
--- a/demos/textarea/index.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { Component } from '@angular/core';
-
-import { ionicBootstrap } from 'ionic-angular';
-
-
-@Component({
- templateUrl: 'main.html'
-})
-class ApiDemoPage {}
-
-
-@Component({
- template: ''
-})
-class ApiDemoApp {
- root = ApiDemoPage;
-}
-
-ionicBootstrap(ApiDemoApp);
diff --git a/demos/title/AppModule.ts b/demos/title/AppModule.ts
new file mode 100644
index 0000000000..97ba0f82f7
--- /dev/null
+++ b/demos/title/AppModule.ts
@@ -0,0 +1,36 @@
+import { Component, NgModule } from '@angular/core';
+import { IonicModule } from 'ionic-angular';
+
+// Use the toolbar demo but pass in the demo name to change the title
+// this will also hide some of the toolbars that don't use `ion-title`
+@Component({
+ templateUrl: '../toolbar/main.html'
+})
+export class ApiDemoPage {
+ demo = "Title";
+ favorites = "recent";
+ apps = "free";
+}
+
+
+@Component({
+ template: ''
+})
+export class ApiDemoApp {
+ root = ApiDemoPage;
+}
+
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ ApiDemoPage
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
diff --git a/demos/title/index.ts b/demos/title/index.ts
deleted file mode 100644
index b95160a6cf..0000000000
--- a/demos/title/index.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { Component } from '@angular/core';
-import { ionicBootstrap } from 'ionic-angular';
-
-
-// Use the toolbar demo but pass in the demo name to change the title
-// this will also hide some of the toolbars that don't use `ion-title`
-@Component({
- templateUrl: '../toolbar/main.html'
-})
-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/AppModule.ts
similarity index 79%
rename from demos/toast/index.ts
rename to demos/toast/AppModule.ts
index 8f59c4ff08..df0a4bce49 100644
--- a/demos/toast/index.ts
+++ b/demos/toast/AppModule.ts
@@ -1,12 +1,10 @@
-import { Component } from '@angular/core';
-
-import { ionicBootstrap, ToastController } from 'ionic-angular';
-
+import { Component, NgModule } from '@angular/core';
+import { IonicModule, ToastController } from 'ionic-angular';
@Component({
templateUrl: 'main.html'
})
-class ApiDemoPage {
+export class ApiDemoPage {
constructor(private toastCtrl: ToastController) { }
showToast(position: string) {
@@ -59,8 +57,21 @@ class ApiDemoPage {
@Component({
template: ''
})
-class ApiDemoApp {
+export class ApiDemoApp {
root = ApiDemoPage;
}
-ionicBootstrap(ApiDemoApp);
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ ApiDemoPage
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
diff --git a/demos/toggle/AppModule.ts b/demos/toggle/AppModule.ts
new file mode 100644
index 0000000000..72ee62b68e
--- /dev/null
+++ b/demos/toggle/AppModule.ts
@@ -0,0 +1,44 @@
+import { Component, NgModule } from '@angular/core';
+import { IonicModule } from 'ionic-angular';
+
+@Component({
+ templateUrl: 'main.html'
+})
+export class ApiDemoPage {
+ data = {
+ frodo: true,
+ sam: false,
+ eowyn: true,
+ legolas: true,
+ gimli: false,
+ saruman: true,
+ gandalf: true,
+ arwen: false,
+ boromir: false,
+ gollum: true,
+ galadriel: false
+ };
+}
+
+
+@Component({
+ template: ''
+})
+export class ApiDemoApp {
+ root = ApiDemoPage;
+}
+
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ ApiDemoPage
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
diff --git a/demos/toggle/index.ts b/demos/toggle/index.ts
deleted file mode 100644
index 1afc0b2d1a..0000000000
--- a/demos/toggle/index.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-import { Component } from '@angular/core';
-
-import { ionicBootstrap } from 'ionic-angular';
-
-
-@Component({
- templateUrl: 'main.html'
-})
-class ApiDemoPage {
- data = {
- frodo: true,
- sam: false,
- eowyn: true,
- legolas: true,
- gimli: false,
- saruman: true,
- gandalf: true,
- arwen: false,
- boromir: false,
- gollum: true,
- galadriel: false
- };
-}
-
-
-@Component({
- template: ''
-})
-class ApiDemoApp {
- root = ApiDemoPage;
-}
-
-ionicBootstrap(ApiDemoApp);
diff --git a/demos/toolbar/AppModule.ts b/demos/toolbar/AppModule.ts
new file mode 100644
index 0000000000..2bc40db1f9
--- /dev/null
+++ b/demos/toolbar/AppModule.ts
@@ -0,0 +1,34 @@
+import { Component, NgModule } from '@angular/core';
+import { IonicModule } from 'ionic-angular';
+
+@Component({
+ templateUrl: 'main.html'
+})
+export class ApiDemoPage {
+ demo = "Toolbar";
+ favorites = "recent";
+ apps = "free";
+}
+
+
+@Component({
+ template: ''
+})
+export class ApiDemoApp {
+ root = ApiDemoPage;
+}
+
+@NgModule({
+ declarations: [
+ ApiDemoApp,
+ ApiDemoPage
+ ],
+ imports: [
+ IonicModule.forRoot(ApiDemoApp)
+ ],
+ bootstrap: [IonicApp],
+ entryComponents: [
+ ApiDemoPage
+ ]
+})
+export class AppModule {}
diff --git a/demos/toolbar/index.ts b/demos/toolbar/index.ts
deleted file mode 100644
index c9eda59f99..0000000000
--- a/demos/toolbar/index.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import { Component } from '@angular/core';
-
-import { ionicBootstrap } from 'ionic-angular';
-
-
-@Component({
- templateUrl: 'main.html'
-})
-class ApiDemoPage {
- demo = "Toolbar";
- favorites = "recent";
- apps = "free";
-}
-
-
-@Component({
- template: ''
-})
-class ApiDemoApp {
- root = ApiDemoPage;
-}
-
-ionicBootstrap(ApiDemoApp);