diff --git a/gulpfile.js b/gulpfile.js
index fc991b0c67..9af4c42511 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -31,6 +31,8 @@ function getBabelOptions(moduleName, moduleType) {
modules: moduleType || "system",
moduleIds: true,
getModuleId: function(name) {
+ if (moduleName === "index") return moduleName;
+
return moduleName + '/' + name.split('/test').join('');
}
}
@@ -177,7 +179,7 @@ gulp.task('bundle.ionic', ['transpile'], function() {
'dist/src/es5/system/ionic/**/*.js'
])
.pipe(concat('ionic.js'))
- .pipe(insert.append('System.config({ "paths": { "ionic/*": "ionic/*" } });'))
+ .pipe(insert.prepend('System.config({ "paths": { "ionic/*": "ionic/*", "rx": "rx" } });\n'))
.pipe(gulp.dest('dist/js/'));
//TODO minify + sourcemaps
});
@@ -203,7 +205,7 @@ gulp.task('e2e', function() {
var buildTest = lazypipe()
//.pipe(traceur, traceurOptions)
.pipe(tsc, tscOptions, null, tscReporter)
- .pipe(babel, getBabelOptions('e2e'))
+ .pipe(babel, getBabelOptions('index'))
var buildE2ETest = lazypipe()
//.pipe(traceur, traceurOptions)
diff --git a/ionic/components/app/app.ts b/ionic/components/app/app.ts
index 313d799d62..adb6d60240 100644
--- a/ionic/components/app/app.ts
+++ b/ionic/components/app/app.ts
@@ -1,5 +1,5 @@
import {Component, View, bootstrap, ElementRef, NgZone, bind, DynamicComponentLoader, Injector} from 'angular2/angular2';
-import {routerInjectables, HashLocationStrategy, LocationStrategy, Router} from 'angular2/router';
+import {ROUTER_BINDINGS, HashLocationStrategy, LocationStrategy, Router} from 'angular2/router';
import {IonicConfig} from '../../config/config';
import {Platform} from '../../platform/platform';
@@ -52,6 +52,7 @@ export class IonicApp {
* @param {string} val Value to set the document title to.
*/
title(val) {
+ // TODO: User angular service
document.title = val;
}
@@ -166,6 +167,8 @@ export class IonicApp {
}
});
+ bodyEle.setAttribute('mode', config.setting('mode'));
+
/**
* Hairline Shim
* Add the "hairline" CSS class name to the body tag
@@ -174,15 +177,13 @@ export class IonicApp {
if (window.devicePixelRatio >= 2) {
var hairlineEle = document.createElement('div');
hairlineEle.style.border = '.5px solid transparent';
- document.body.appendChild(hairlineEle);
+ bodyEle.appendChild(hairlineEle);
if (hairlineEle.offsetHeight === 1) {
- document.body.classList.add('hairlines');
+ bodyEle.classList.add('hairlines');
}
- document.body.removeChild(hairlineEle);
+ bodyEle.removeChild(hairlineEle);
}
-
- bodyEle.setAttribute('mode', config.setting('mode'));
}
/**
@@ -216,7 +217,7 @@ function initApp(window, document, config) {
setTimeout(() => {
// start listening for resizes XXms after the app starts
window.addEventListener('resize', Platform.winResize);
- }, 2000);
+ }, 2500);
return app;
}
@@ -282,7 +283,7 @@ export function ionicBootstrap(rootComponentType, config) {
bind(ActionMenu).toValue(actionMenu),
bind(Modal).toValue(modal),
bind(Popup).toValue(popup),
- routerInjectables,
+ ROUTER_BINDINGS,
bind(LocationStrategy).toClass(HashLocationStrategy)
]);
diff --git a/ionic/components/nav/test/basic/index.ts b/ionic/components/nav/test/basic/index.ts
index 520a75dcb9..c525b27b28 100644
--- a/ionic/components/nav/test/basic/index.ts
+++ b/ionic/components/nav/test/basic/index.ts
@@ -1,5 +1,123 @@
import {App, NavController} from 'ionic/ionic';
-import {FirstPage} from './pages/first-page';
+import {IonicView, IonicConfig, IonicApp} from 'ionic/ionic';
+import {NavParams, NavController} from 'ionic/ionic';
+
+
+@IonicView({
+ template: '' +
+ '' +
+ '{{title}}' +
+ '' +
+ '' +
+ '' +
+ '' +
+ '' +
+ '{{title}}
' +
+ '' +
+ '' +
+ '' +
+ '' +
+ '' +
+ '' +
+ ''
+})
+class FirstPage {
+ constructor(
+ nav: NavController,
+ app: IonicApp,
+ config: IonicConfig
+ ) {
+ this.nav = nav;
+ this.title = 'First Page';
+
+ this.pushPage = SecondPage;
+ this.pushData = {
+ id: 420
+ }
+ }
+
+ setItems() {
+ let items = [
+ ThirdPage
+ ];
+
+ this.nav.setItems(items);
+ }
+
+ push() {
+ this.nav.push(SecondPage, { id: 8675309, myData: [1,2,3,4] } );
+ }
+}
+
+
+@IonicView({
+ template: `
+
+ Second page
+ This page does not have a nav bar!
+
+
+
+
+
+
+ `
+})
+class SecondPage {
+ constructor(
+ nav: NavController,
+ params: NavParams
+ ) {
+ this.nav = nav;
+ this.params = params;
+
+ console.log('Second page params:', params);
+ }
+
+ setItems() {
+ let items = [
+ FirstPage,
+ ThirdPage
+ ];
+
+ this.nav.setItems(items);
+ }
+
+ pop() {
+ this.nav.pop();
+ }
+
+ push() {
+ this.nav.push(ThirdPage);
+ }
+
+}
+
+
+@IonicView({
+ template: `
+ Third Page Header
+
+
+
+
+
+
+ `
+})
+class ThirdPage {
+ constructor(
+ nav: NavController
+ ) {
+ this.nav = nav
+ }
+
+ pop() {
+ this.nav.pop()
+ }
+
+}
+
@App({
diff --git a/ionic/components/nav/test/basic/pages/first-page.ts b/ionic/components/nav/test/basic/pages/first-page.ts
deleted file mode 100644
index 0925afcf13..0000000000
--- a/ionic/components/nav/test/basic/pages/first-page.ts
+++ /dev/null
@@ -1,80 +0,0 @@
-import {IonicView, IonicConfig, IonicApp} from 'ionic/ionic';
-import {NavParams, NavController} from 'ionic/ionic';
-
-import {SecondPage} from './second-page';
-import {ThirdPage} from './third-page';
-
-
-@IonicView({
- template: '' +
- '' +
- '{{title}}' +
- '' +
- '' +
- '' +
- '' +
- '' +
- '{{title}}
' +
- '' +
- '' +
- '' +
- '' +
- '' +
- '' +
- ''
-})
-export class FirstPage {
- constructor(
- nav: NavController,
- app: IonicApp,
- config: IonicConfig
- ) {
- this.nav = nav;
- this.title = 'First Page';
-
- this.pushPage = SecondPage;
- this.pushData = {
- id: 420
- }
- }
-
- setItems() {
- let items = [
- ThirdPage
- ];
-
- this.nav.setItems(items);
- }
-
- // viewLoaded() {
- // console.log('viewLoaded first page');
- // }
-
- // viewWillEnter() {
- // console.log('viewWillEnter first page');
- // }
-
- // viewDidEnter() {
- // console.log('viewDidEnter first page');
- // }
-
- // viewWillLeave() {
- // console.log('viewWillLeave first page');
- // }
-
- // viewDidLeave() {
- // console.log('viewDidLeave first page');
- // }
-
- // viewWillUnload() {
- // console.log('viewWillUnload first page');
- // }
-
- // viewDidUnload() {
- // console.log('viewDidUnload first page');
- // }
-
- push() {
- this.nav.push(SecondPage, { id: 8675309, myData: [1,2,3,4] } );
- }
-}
diff --git a/ionic/components/nav/test/basic/pages/second-page.ts b/ionic/components/nav/test/basic/pages/second-page.ts
deleted file mode 100644
index d342e20f85..0000000000
--- a/ionic/components/nav/test/basic/pages/second-page.ts
+++ /dev/null
@@ -1,75 +0,0 @@
-import {IonicView, NavController, NavParams} from 'ionic/ionic';
-import {ThirdPage} from './third-page';
-import {FirstPage} from './first-page';
-
-
-@IonicView({
- template: `
-
- Second page
- This page does not have a nav bar!
-
-
-
-
-
-
- `
-})
-export class SecondPage {
- constructor(
- nav: NavController,
- params: NavParams
- ) {
- this.nav = nav;
- this.params = params;
-
- console.log('Second page params:', params);
- }
-
- setItems() {
- let items = [
- FirstPage,
- ThirdPage
- ];
-
- this.nav.setItems(items);
- }
-
- pop() {
- this.nav.pop();
- }
-
- push() {
- this.nav.push(ThirdPage);
- }
-
- // viewLoaded() {
- // console.log('viewLoaded second page');
- // }
-
- // viewWillEnter() {
- // console.log('viewWillEnter second page');
- // }
-
- // viewDidEnter() {
- // console.log('viewDidEnter second page');
- // }
-
- // viewWillLeave() {
- // console.log('viewWillLeave second page');
- // }
-
- // viewDidLeave() {
- // console.log('viewDidLeave second page');
- // }
-
- // viewWillUnload() {
- // console.log('viewWillUnload second page');
- // }
-
- // viewDidUnload() {
- // console.log('viewDidUnload second page');
- // }
-
-}
diff --git a/ionic/components/nav/test/basic/pages/third-page.ts b/ionic/components/nav/test/basic/pages/third-page.ts
deleted file mode 100644
index 5bbe0ee0fd..0000000000
--- a/ionic/components/nav/test/basic/pages/third-page.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-import {IonicView, NavController} from 'ionic/ionic';
-
-
-@IonicView({
- template: `
- Third Page Header
-
-
-
-
-
-
- `
-})
-export class ThirdPage {
- constructor(
- nav: NavController
- ) {
- this.nav = nav
- }
-
- pop() {
- this.nav.pop()
- }
-
- // viewLoaded() {
- // console.log('viewLoaded third page');
- // }
-
- // viewWillEnter() {
- // console.log('viewWillEnter third page');
- // }
-
- // viewDidEnter() {
- // console.log('viewDidEnter third page');
- // }
-
- // viewWillLeave() {
- // console.log('viewWillLeave third page');
- // }
-
- // viewDidLeave() {
- // console.log('viewDidLeave third page');
- // }
-
- // viewWillUnload() {
- // console.log('viewWillUnload third page');
- // }
-
- // viewDidUnload() {
- // console.log('viewDidUnload third page');
- // }
-
-}
diff --git a/package.json b/package.json
index 3170761fa4..3746e6aae9 100644
--- a/package.json
+++ b/package.json
@@ -7,13 +7,13 @@
"url": "https://github.com/driftyco/ionic2.git"
},
"dependencies": {
- "angular2": "2.0.0-alpha.35",
+ "angular2": "2.0.0-alpha.36",
"reflect-metadata": "0.1.0",
- "rtts_assert": "2.0.0-alpha.35",
+ "rtts_assert": "2.0.0-alpha.36",
"swiper": "^3.1.2",
- "systemjs": "0.16.11",
+ "systemjs": "0.18.10",
"traceur": "0.0.91",
- "zone.js": "0.5.2"
+ "zone.js": "0.5.4"
},
"devDependencies": {
"canonical-path": "0.0.2",
diff --git a/scripts/e2e/e2e.template.html b/scripts/e2e/e2e.template.html
index 395cec5734..3ffbb3fb28 100644
--- a/scripts/e2e/e2e.template.html
+++ b/scripts/e2e/e2e.template.html
@@ -53,8 +53,7 @@
-
-
+