diff --git a/gulpfile.js b/gulpfile.js
index de01405bcb..c8474ce1d8 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -12,99 +12,44 @@ var tsc = require('gulp-typescript');
var cache = require('gulp-cached');
var minimist = require('minimist');
-function getBabelOptions(moduleName, moduleType) {
- return {
- optional: ['es7.decorators'],
- modules: moduleType || "system",
- moduleIds: true,
- getModuleId: function(name) {
- if (moduleName == "e2e"){
- return name.replace(/^.*\/test\/[^\/]*\//, '');
- }
- else if (moduleName == "demos"){
- return name.replace(/^(.*?)\//, '')
- }
-
- return moduleName + '/' + name.split('/test').join('');
- }
- }
-}
-
-function buildDemoBundle(opts, done) {
- var glob = require('glob');
- var webpack = require('webpack');
- var path = require('path');
- var _ = require('lodash');
-
- var numWebpacks = 0;
- var fp = 'dist/demos/'+opts.demo+'/index.js';
- if (opts.demo == 'api') {
- fp = "dist/demos/**/index.js";
- }
-
- return glob(fp, function(err, files){
- files.forEach(function(file){
- var config = require('./scripts/demos/webpack.config.js');
-
- // add our bundle entry, removing previous if necessary
- // since config is cached
- if (config.entry.length > 5) {
- config.entry.pop();
- }
- config.entry.push('./' + file);
- config.output = {
- filename: path.dirname(file) + '/bundle.js'
- }
-
- // pretty sure this is a race, but it works
- numWebpacks++;
- webpack(config, function(err, stats){
- // var statsOptions = {
- // 'colors': true,
- // 'modules': true,
- // 'chunks': false,
- // 'exclude': ['node_modules'],
- // 'errorDetails': true
- // }
- // console.log(stats.toString(statsOptions));
- if (--numWebpacks === 0) done();
- })
- })
-
- });
-}
-
-var tscOptions = {
- target: 'ES6',
- allowNonTsExtensions: true,
- isolatedModules: true,
- emitDecoratorMetadata: true,
- experimentalDecorators: true,
- noEmitOnError: false, // ignore errors
- rootDir: '.'
-}
-var tscReporter = {
- error: function (error) {
- console.error(error.message);
- }
-};
-
var flagConfig = {
string: ['port', 'version', 'ngVersion', 'animations'],
boolean: ['dry-run'],
alias: {'p': 'port', 'v': 'version', 'a': 'ngVersion'},
default: { port: 8000 }
};
-
-
var flags = minimist(process.argv.slice(2), flagConfig);
+var tscOptions = {
+ emitDecoratorMetadata: true,
+ experimentalDecorators: true,
+ target: "es5",
+ module: "commonjs",
+ declaration: true,
+ outDir: "dist"
+}
+
+var tscOptionsNoTypeCheck = {
+ emitDecoratorMetadata: true,
+ experimentalDecorators: true,
+ target: "es5",
+ module: "commonjs",
+ isolatedModules: true
+}
+
+var tscReporter = {
+ error: function (error) {
+ // TODO
+ // suppress type errors until we convert everything to TS
+ // console.error(error.message);
+ }
+};
+
gulp.task('build', function(done) {
runSequence(
+ 'copy.web-animations',
'bundle',
- 'e2e',
- 'sass',
- 'fonts',
+ ['e2e', 'sass', 'fonts'],
done
);
})
@@ -125,18 +70,7 @@ gulp.task('watch', function(done) {
],
function(file) {
if (file.event === "unlink") {
- var basePath = file.base.substring(0, file.base.lastIndexOf("ionic/"));
- var relPath = file.history[0].replace(basePath, "").replace(".ts", ".js");
-
- var es6Path = basePath + "dist/src/es6/" + relPath;
- var commonPath = basePath + "dist/src/es5/common/" + relPath;
- var systemPath = basePath + "dist/src/es5/system/" + relPath;
-
- delete cache.caches.transpile[file.history[0]];
-
- del([es6Path, commonPath, systemPath], function(){
- gulp.start('bundle');
- });
+ deleteFile(file);
} else {
gulp.start('bundle');
}
@@ -144,21 +78,7 @@ gulp.task('watch', function(done) {
);
watch('ionic/components/*/test/**/*', function(file) {
- if (file.event === "unlink") {
- var paths = file.history[0].split("ionic/components/");
- var basePath = paths[0],
- relPath = paths[1].split("/test").join("").replace(".ts", ".js");
-
- var distPath = basePath + "dist/e2e/" + relPath;
-
- delete cache.caches.e2e[file.history[0]];
-
- del([distPath], function(){
- gulp.start('e2e');
- });
- } else {
- gulp.start('e2e');
- }
+ gulp.start('e2e');
});
watch('ionic/**/*.scss', function() {
@@ -168,13 +88,25 @@ gulp.task('watch', function(done) {
done();
}
);
-});
+ function deleteFile(file) {
+ var basePath = file.base.substring(0, file.base.lastIndexOf("ionic/"));
+ var relativePath = file.history[0].replace(file.base, '').replace('.ts', '.js');
+
+ var filePath = basePath + 'dist/' + relativePath;
+ var typingPath = filePath.replace('.js', '.d.ts');
+
+ delete cache.caches.transpile[file.history[0]];
+
+ del([filePath, typingPath], function(){
+ gulp.start('bundle');
+ });
+ }
+});
gulp.task('serve', function() {
var connect = require('gulp-connect');
connect.server({
- root: 'dist',
port: flags.port,
livereload: false
});
@@ -184,56 +116,74 @@ gulp.task('clean', function(done) {
del(['dist/**', '!dist'], done);
});
-function transpile(moduleType) {
- var stream = gulp.src([
+function tsResult(options){
+ return gulp.src([
'ionic/**/*.ts',
'!ionic/components/*/test/**/*',
'!ionic/util/test/*'
])
- .pipe(cache('transpile', { optimizeMemory: true }))
- .pipe(tsc(tscOptions, null, tscReporter))
- .on('error', function(error) {
- stream.emit('end');
- })
- .pipe(gulp.dest('dist/src/es6/ionic'))
- .pipe(babel(getBabelOptions('ionic', moduleType)))
- .on('error', function (err) {
- console.log("ERROR: " + err.message);
- this.emit('end');
- })
- .pipe(gulp.dest('dist/src/es5/' + moduleType + '/ionic'))
-
- return stream;
+ .pipe(cache('transpile', { optimizeMemory: true }))
+ .pipe(tsc(options, undefined, tscReporter))
+ .on('error', function(error) {
+ console.log(error.message);
+ this.emit('end');
+ });
}
-
-gulp.task('transpile.system', function() { return transpile("system"); });
-gulp.task('transpile.common', function() {
- // necessary for publish task, remove if we ever do incremental builds with cjs
- cache.caches && delete cache.caches.transpile;
- return transpile("common");
+gulp.task('transpile.no-typecheck', function(){
+ return tsResult(tscOptionsNoTypeCheck)
+ .pipe(gulp.dest('dist'));
});
-gulp.task('transpile', ['transpile.system']);
-gulp.task('bundle.ionic', ['transpile'], function() {
- var insert = require('gulp-insert');
- var concat = require('gulp-concat');
+gulp.task('transpile.typecheck', function(){
+ var merge = require('merge2');
- var prepend = [];
+ var result = tsResult(tscOptions);
- // force the web animations api polyfill to kick in
- if (flags.animations == 'polyfill') {
- prepend.push('window.Element.prototype.animate=undefined;');
- }
+ // merge definition and source streams
+ return merge([
+ result.dts,
+ result.js
+ ])
+ .pipe(gulp.dest('dist'));
+})
- return gulp.src([
- 'node_modules/es6-shim/es6-shim.min.js',
- 'dist/src/es5/system/ionic/**/*.js'
- ])
- .pipe(concat('ionic.js'))
- .pipe(insert.prepend(prepend.join('\n')))
- .pipe(gulp.dest('dist/js/'));
- //TODO minify + sourcemaps
-});
+gulp.task('transpile', ['transpile.no-typecheck']);
+
+gulp.task('bundle', ['transpile'], function(done){
+ //TODO
+ // if (flags.animations == 'polyfill') {
+ // prepend.push('window.Element.prototype.animate=undefined;');
+ // }
+
+ var config = require('./scripts/npm/ionic.webpack.config.js');
+ bundle({
+ config: config,
+ cb: done,
+ stats: true
+ });
+})
+
+function bundle(args) {
+ var webpack = require('webpack');
+ var path = require('path');
+
+ var numTasks = args.numTasks ? args.numTasks : 0;
+
+ webpack(args.config, function(err, stats){
+ if (args.stats) {
+ var statsOptions = {
+ 'colors': true,
+ 'modules': false,
+ 'chunks': false,
+ 'exclude': ['node_module'],
+ 'errorDetails': true
+ }
+ console.log(stats.toString(statsOptions));
+ }
+
+ if (numTasks === 0 && args.cb) args.cb();
+ })
+}
gulp.task('temp.hack', function(){
var fs = require('fs');
@@ -262,17 +212,9 @@ gulp.task('temp.hack', function(){
fs.writeFileSync(file, myHackedFileThatYouLove, 'utf8');
});
-gulp.task('bundle', ['bundle.ionic'], function() {
- var concat = require('gulp-concat');
-
- return gulp.src(buildConfig.scripts)
- .pipe(concat('ionic.bundle.js'))
- .pipe(gulp.dest('dist/js'));
-})
-
gulp.task('tests', function() {
return gulp.src('ionic/**/test/**/*.spec.ts')
- .pipe(tsc(tscOptions, null, tscReporter))
+ .pipe(tsc(tscOptions, undefined, tscReporter))
.pipe(babel(getBabelOptions('dist/tests')))
.pipe(rename(function(file) {
var regex = new RegExp(path.sep + 'test(' + path.sep + '|$)');
@@ -281,30 +223,19 @@ gulp.task('tests', function() {
.pipe(gulp.dest('dist/tests'))
})
-gulp.task('e2e', function() {
+gulp.task('e2e.build', function() {
var gulpif = require('gulp-if');
- var lazypipe = require('lazypipe');
+ var merge = require('merge2');
var _ = require('lodash');
var fs = require('fs');
var VinylFile = require('vinyl');
- var buildTest = lazypipe()
- //.pipe(traceur, traceurOptions)
- .pipe(tsc, tscOptions, null, tscReporter)
- .pipe(babel, getBabelOptions('e2e'))
-
- var buildE2ETest = lazypipe()
- //.pipe(traceur, traceurOptions)
- .pipe(tsc, tscOptions, null, tscReporter)
- .pipe(babel)
-
var indexTemplate = _.template(
fs.readFileSync('scripts/e2e/e2e.template.html')
)({
- buildConfig: buildConfig
-
+ buildConfig: buildConfig
})
- var testTemplate = _.template( fs.readFileSync('scripts/e2e/e2e.template.js') )
+ var testTemplate = _.template(fs.readFileSync('scripts/e2e/e2e.template.js'));
var platforms = [
'android',
@@ -312,20 +243,34 @@ gulp.task('e2e', function() {
];
// Get each test folder with gulp.src
- return gulp.src(['ionic/components/*/test/*/**/*', '!ionic/components/*/test/*/**/*.spec.ts'])
- .pipe(cache('e2e', { optimizeMemory: true }))
- .pipe(gulpif(/e2e.ts$/, buildE2ETest()))
- .pipe(gulpif(/.ts$/, buildTest()))
- .on('error', function (err) {
- console.log("ERROR: " + err.message);
+ var tsResult = gulp.src([
+ 'ionic/components/*/test/*/**/*.ts',
+ '!ionic/components/*/test/*/**/*.spec.ts'
+ ])
+ .pipe(cache('e2e.ts'))
+ .pipe(tsc(tscOptionsNoTypeCheck, undefined, tscReporter))
+ .on('error', function(error) {
+ console.log(error.message);
this.emit('end');
})
- .pipe(gulpif(/index.js$/, createIndexHTML())) //TSC changes .ts to .js
- .pipe(rename(function(file) {
- file.dirname = file.dirname.replace(path.sep + 'test' + path.sep, path.sep)
- }))
+ .pipe(gulpif(/index.js$/, createIndexHTML()))
.pipe(gulpif(/e2e.js$/, createPlatformTests()))
- .pipe(gulp.dest('dist/e2e/'))
+
+ var testFiles = gulp.src([
+ 'ionic/components/*/test/*/**/*',
+ '!ionic/components/*/test/*/**/*.ts'
+ ])
+ .pipe(cache('e2e.files'))
+
+ return merge([
+ tsResult,
+ testFiles
+ ])
+ .pipe(rename(function(file) {
+ var sep = path.sep;
+ file.dirname = file.dirname.replace(sep + 'test' + sep, sep)
+ }))
+ .pipe(gulp.dest('dist/e2e/'));
function createIndexHTML() {
return through2.obj(function(file, enc, next) {
@@ -361,30 +306,54 @@ gulp.task('e2e', function() {
}
});
+gulp.task('e2e.bundle', ['e2e.build'], function(done) {
+ var glob = require('glob');
+ var webpack = require('webpack');
+ var path = require('path');
+ var _ = require('lodash');
+
+ return glob("dist/e2e/**/index.js", function(err, files){
+ var numTasks = files.length;
+ files.forEach(function(file){
+ var config = require('./scripts/e2e/webpack.config.js');
+
+ // add our bundle entry, removing previous if necessary
+ // since config is cached
+ if (config.entry.length > 1) {
+ config.entry.pop();
+ }
+ config.entry.push('./' + file);
+ config.output = {
+ libraryTarget: 'commonjs2',
+ filename: path.dirname(file) + '/bundle.js'
+ }
+
+ bundle({
+ config: config,
+ numTasks: --numTasks,
+ stats: false,
+ cb: done
+ });
+ })
+ })
+});
+
+gulp.task('e2e', ['e2e.bundle']);
+
gulp.task('sass', function() {
var sass = require('gulp-sass');
var autoprefixer = require('gulp-autoprefixer');
- gulp.src('ionic/ionic.ios.scss')
- .pipe(sass()
- .on('error', sass.logError)
- )
- .pipe(autoprefixer(buildConfig.autoprefixer))
- .pipe(gulp.dest('dist/css/'));
-
- gulp.src('ionic/ionic.md.scss')
- .pipe(sass()
- .on('error', sass.logError)
- )
- .pipe(autoprefixer(buildConfig.autoprefixer))
- .pipe(gulp.dest('dist/css/'));
-
- return gulp.src('ionic/ionic.scss')
- .pipe(sass()
- .on('error', sass.logError)
- )
- .pipe(autoprefixer(buildConfig.autoprefixer))
- .pipe(gulp.dest('dist/css/'));
+ gulp.src([
+ 'ionic/ionic.ios.scss',
+ 'ionic/ionic.md.scss',
+ 'ionic/ionic.scss'
+ ])
+ .pipe(sass()
+ .on('error', sass.logError)
+ )
+ .pipe(autoprefixer(buildConfig.autoprefixer))
+ .pipe(gulp.dest('dist/bundles/'));
});
gulp.task('fonts', function() {
@@ -459,7 +428,7 @@ gulp.task('build.demos', function(){
var VinylFile = require('vinyl');
var buildTest = lazypipe()
- .pipe(tsc, tscOptions, null, tscReporter)
+ .pipe(tsc, tscOptions, undefined, tscReporter)
.pipe(babel, getBabelOptions('demos', 'common'))
// .pipe(babel, getBabelOptions('demos'))
@@ -525,3 +494,45 @@ gulp.task('watch:demos', function() {
gulp.start('demos');
});
});
+
+function buildDemoBundle(opts, done) {
+ var glob = require('glob');
+ var webpack = require('webpack');
+ var path = require('path');
+ var _ = require('lodash');
+
+ var fp = 'dist/demos/'+opts.demo+'/index.js';
+ if (opts.demo == 'api') {
+ fp = "dist/demos/**/index.js";
+ }
+
+ return glob(fp, function(err, files){
+ var numTasks = files.length;
+ files.forEach(function(file){
+ var config = require('./scripts/demos/webpack.config.js');
+
+ // add our bundle entry, removing previous if necessary
+ // since config is cached
+ if (config.entry.length > 4) {
+ config.entry.pop();
+ }
+ config.entry.push('./' + file);
+ config.output = {
+ filename: path.dirname(file) + '/bundle.js'
+ }
+
+ webpack(config, function(err, stats){
+ // var statsOptions = {
+ // 'colors': true,
+ // 'modules': true,
+ // 'chunks': false,
+ // 'exclude': ['node_modules'],
+ // 'errorDetails': true
+ // }
+ // console.log(stats.toString(statsOptions));
+ if (--numTasks === 0) done();
+ })
+ })
+
+ });
+}
diff --git a/ionic/components.ts b/ionic/components.ts
index 13fdaab7f3..832d43e319 100644
--- a/ionic/components.ts
+++ b/ionic/components.ts
@@ -1,39 +1,38 @@
-
-export * from 'ionic/components/app/app'
-export * from 'ionic/components/app/id'
-export * from 'ionic/components/action-sheet/action-sheet'
-export * from 'ionic/components/blur/blur'
-export * from 'ionic/components/button/button'
-export * from 'ionic/components/checkbox/checkbox'
-export * from 'ionic/components/content/content'
-export * from 'ionic/components/icon/icon'
-export * from 'ionic/components/item/item'
-export * from 'ionic/components/item/item-sliding'
-export * from 'ionic/components/menu/menu'
-export * from 'ionic/components/menu/menu-types'
-export * from 'ionic/components/menu/menu-toggle'
-export * from 'ionic/components/menu/menu-close'
-export * from 'ionic/components/text-input/text-input'
-export * from 'ionic/components/text-input/label'
-export * from 'ionic/components/list/list'
-export * from 'ionic/components/show-hide-when/show-hide-when'
-export * from 'ionic/components/modal/modal'
-export * from 'ionic/components/nav/nav'
-export * from 'ionic/components/nav/nav-controller'
-export * from 'ionic/components/nav/view-controller'
-export * from 'ionic/components/nav/nav-push'
-export * from 'ionic/components/nav/nav-router'
-export * from 'ionic/components/navbar/navbar'
-export * from 'ionic/components/overlay/overlay'
-export * from 'ionic/components/popup/popup'
-export * from 'ionic/components/slides/slides'
-export * from 'ionic/components/radio/radio'
-export * from 'ionic/components/scroll/scroll'
-export * from 'ionic/components/scroll/pull-to-refresh'
-export * from 'ionic/components/searchbar/searchbar'
-export * from 'ionic/components/segment/segment'
-export * from 'ionic/components/tabs/tabs'
-export * from 'ionic/components/tabs/tab'
-export * from 'ionic/components/tap-click/tap-click'
-export * from 'ionic/components/toggle/toggle'
-export * from 'ionic/components/toolbar/toolbar'
+export * from './components/app/app'
+export * from './components/app/id'
+export * from './components/action-sheet/action-sheet'
+export * from './components/blur/blur'
+export * from './components/button/button'
+export * from './components/checkbox/checkbox'
+export * from './components/content/content'
+export * from './components/icon/icon'
+export * from './components/item/item'
+export * from './components/item/item-sliding'
+export * from './components/menu/menu'
+export * from './components/menu/menu-types'
+export * from './components/menu/menu-toggle'
+export * from './components/menu/menu-close'
+export * from './components/text-input/text-input'
+export * from './components/text-input/label'
+export * from './components/list/list'
+export * from './components/show-hide-when/show-hide-when'
+export * from './components/modal/modal'
+export * from './components/nav/nav'
+export * from './components/nav/nav-controller'
+export * from './components/nav/view-controller'
+export * from './components/nav/nav-push'
+export * from './components/nav/nav-router'
+export * from './components/navbar/navbar'
+export * from './components/overlay/overlay'
+export * from './components/popup/popup'
+export * from './components/slides/slides'
+export * from './components/radio/radio'
+export * from './components/scroll/scroll'
+export * from './components/scroll/pull-to-refresh'
+export * from './components/searchbar/searchbar'
+export * from './components/segment/segment'
+export * from './components/tabs/tabs'
+export * from './components/tabs/tab'
+export * from './components/tap-click/tap-click'
+export * from './components/toggle/toggle'
+export * from './components/toolbar/toolbar'
diff --git a/ionic/components/action-sheet/action-sheet.ts b/ionic/components/action-sheet/action-sheet.ts
index a59d9280d8..de365a83a6 100644
--- a/ionic/components/action-sheet/action-sheet.ts
+++ b/ionic/components/action-sheet/action-sheet.ts
@@ -5,7 +5,8 @@
* @description
* The ActionSheet is a modal menu with options to select based on an action.
*/
-import {Component, Injectable, Renderer, NgFor, NgIf} from 'angular2/angular2';
+import {Component, Injectable, Renderer} from 'angular2/core';
+import {NgFor, NgIf} from 'angular2/common';
import {OverlayController} from '../overlay/overlay-controller';
import {Config} from '../../config/config';
diff --git a/ionic/components/app/app.ts b/ionic/components/app/app.ts
index 2c2fdbab73..45b3e9597c 100644
--- a/ionic/components/app/app.ts
+++ b/ionic/components/app/app.ts
@@ -1,4 +1,5 @@
-import {Injectable, NgZone, Title} from 'angular2/angular2';
+import {Injectable, NgZone} from 'angular2/core';
+import {Title} from 'angular2/platform/browser';
import {Config} from '../../config/config';
import {ClickBlock} from '../../util/click-block';
diff --git a/ionic/components/app/id.ts b/ionic/components/app/id.ts
index c89f3f1f5e..3996f55228 100644
--- a/ionic/components/app/id.ts
+++ b/ionic/components/app/id.ts
@@ -1,4 +1,4 @@
-import {AppViewManager, ElementRef, Directive, Renderer} from 'angular2/angular2';
+import {AppViewManager, ElementRef, Directive, Renderer} from 'angular2/core';
import {IonicApp} from './app';
diff --git a/ionic/components/app/test/storage/index.ts b/ionic/components/app/test/storage/index.ts
index 1f34536d9c..0c60345a83 100644
--- a/ionic/components/app/test/storage/index.ts
+++ b/ionic/components/app/test/storage/index.ts
@@ -1,4 +1,5 @@
-import {Component, Control, ControlGroup} from 'angular2/angular2';
+import {Component} from 'angular2/core';
+import {Control, ControlGroup} from 'angular2/common';
import {App, Storage, LocalStorage, SqlStorage} from 'ionic/ionic';
diff --git a/ionic/components/blur/blur.ts b/ionic/components/blur/blur.ts
index 928a62142f..a8e312d88a 100644
--- a/ionic/components/blur/blur.ts
+++ b/ionic/components/blur/blur.ts
@@ -1,4 +1,4 @@
-import {Directive, Renderer, ElementRef} from 'angular2/angular2';
+import {Directive, Renderer, ElementRef} from 'angular2/core';
/**
diff --git a/ionic/components/button/button.ts b/ionic/components/button/button.ts
index 37adca5541..8b96cb7b21 100644
--- a/ionic/components/button/button.ts
+++ b/ionic/components/button/button.ts
@@ -1,4 +1,4 @@
-import {Directive, ElementRef, Renderer, Attribute, Optional} from 'angular2/angular2';
+import {Directive, ElementRef, Renderer, Attribute, Optional} from 'angular2/core';
import {Config} from '../../config/config';
import {Toolbar} from '../toolbar/toolbar';
diff --git a/ionic/components/checkbox/checkbox.ts b/ionic/components/checkbox/checkbox.ts
index b752798aed..4b8307d4e1 100644
--- a/ionic/components/checkbox/checkbox.ts
+++ b/ionic/components/checkbox/checkbox.ts
@@ -1,4 +1,5 @@
-import {Component, Directive, Optional, NgControl, ElementRef} from 'angular2/angular2';
+import {Component, Directive, Optional, ElementRef} from 'angular2/core';
+import {NgControl} from 'angular2/common';
import {Ion} from '../ion';
import {Form} from '../../util/form';
diff --git a/ionic/components/checkbox/test/basic/index.ts b/ionic/components/checkbox/test/basic/index.ts
index 49e605090c..751eba08ea 100644
--- a/ionic/components/checkbox/test/basic/index.ts
+++ b/ionic/components/checkbox/test/basic/index.ts
@@ -9,7 +9,8 @@ import {
NgControlName,
NgFormModel,
FormBuilder
-} from 'angular2/angular2';
+} from 'angular2/common';
+
@App({
templateUrl: 'main.html'
diff --git a/ionic/components/content/content.ts b/ionic/components/content/content.ts
index 4f3cc7c4bb..7fe59b2853 100644
--- a/ionic/components/content/content.ts
+++ b/ionic/components/content/content.ts
@@ -1,4 +1,4 @@
-import {Component, ElementRef, Optional, NgZone} from 'angular2/angular2';
+import {Component, ElementRef, Optional, NgZone} from 'angular2/core';
import {Ion} from '../ion';
import {Config} from '../../config/config';
diff --git a/ionic/components/icon/icon.ts b/ionic/components/icon/icon.ts
index 44543c5c3b..28a1abb5c4 100644
--- a/ionic/components/icon/icon.ts
+++ b/ionic/components/icon/icon.ts
@@ -1,4 +1,4 @@
-import {Directive, ElementRef, Attribute, Renderer} from 'angular2/angular2';
+import {Directive, ElementRef, Attribute, Renderer} from 'angular2/core';
import {Config} from '../../config/config';
diff --git a/ionic/components/ion.ts b/ionic/components/ion.ts
index fc67620d11..a92669b75b 100644
--- a/ionic/components/ion.ts
+++ b/ionic/components/ion.ts
@@ -1,6 +1,7 @@
+import {ElementRef} from 'angular2/core';
import {Config} from '../config/config';
-import {isArray} from 'ionic/util';
-import * as dom from 'ionic/util/dom';
+import {isArray} from '../util';
+import * as dom from '../util/dom';
/**
diff --git a/ionic/components/item/item-sliding-gesture.ts b/ionic/components/item/item-sliding-gesture.ts
index 06abc5aefa..502038fe0c 100644
--- a/ionic/components/item/item-sliding-gesture.ts
+++ b/ionic/components/item/item-sliding-gesture.ts
@@ -1,8 +1,8 @@
-import {Hammer} from 'ionic/gestures/hammer';
-import {DragGesture} from 'ionic/gestures/drag-gesture';
+import {Hammer} from '../../gestures/hammer';
+import {DragGesture} from '../../gestures/drag-gesture';
import {List} from '../list/list';
-import {CSS, raf, closest} from 'ionic/util/dom';
+import {CSS, raf, closest} from '../../util/dom';
export class ItemSlidingGesture extends DragGesture {
diff --git a/ionic/components/item/item-sliding.ts b/ionic/components/item/item-sliding.ts
index 66d294d1df..d6688f6630 100644
--- a/ionic/components/item/item-sliding.ts
+++ b/ionic/components/item/item-sliding.ts
@@ -1,4 +1,4 @@
-import {Component, ElementRef, Optional} from 'angular2/angular2';
+import {Component, ElementRef, Optional} from 'angular2/core';
import {List} from '../list/list';
diff --git a/ionic/components/item/item.ts b/ionic/components/item/item.ts
index d89d9e181d..c24ad6f3e7 100644
--- a/ionic/components/item/item.ts
+++ b/ionic/components/item/item.ts
@@ -1,4 +1,4 @@
-import {Component} from 'angular2/angular2';
+import {Component} from 'angular2/core';
/**
diff --git a/ionic/components/list/list.ts b/ionic/components/list/list.ts
index 9168239397..b57e0d2e41 100644
--- a/ionic/components/list/list.ts
+++ b/ionic/components/list/list.ts
@@ -1,10 +1,10 @@
-import {Directive, ElementRef, NgZone} from 'angular2/angular2';
+import {Directive, ElementRef, NgZone} from 'angular2/core';
import {Ion} from '../ion';
import {Config} from '../../config/config';
import {ListVirtualScroll} from './virtual';
import {ItemSlidingGesture} from '../item/item-sliding-gesture';
-import * as util from 'ionic/util';
+import * as util from '../../util';
/**
* The List is a widely used interface element in almost any mobile app, and can include
diff --git a/ionic/components/list/test/infinite/index.ts b/ionic/components/list/test/infinite/index.ts
index ffd2f0623c..9164945f91 100644
--- a/ionic/components/list/test/infinite/index.ts
+++ b/ionic/components/list/test/infinite/index.ts
@@ -1,5 +1,5 @@
-import {ProtoViewRef, ViewContainerRef} from 'angular2/angular2'
-import {Directive, Host, forwardRef} from 'angular2/angular2';
+import {ProtoViewRef, ViewContainerRef} from 'angular2/core'
+import {Directive, Host, forwardRef} from 'angular2/core';
import {App, List} from 'ionic/ionic';
diff --git a/ionic/components/menu/menu-close.ts b/ionic/components/menu/menu-close.ts
index 71ff611a66..ace10bf7f5 100644
--- a/ionic/components/menu/menu-close.ts
+++ b/ionic/components/menu/menu-close.ts
@@ -1,4 +1,4 @@
-import {Directive} from 'angular2/angular2';
+import {Directive} from 'angular2/core';
import {IonicApp} from '../app/app';
import {Menu} from './menu';
diff --git a/ionic/components/menu/menu-gestures.ts b/ionic/components/menu/menu-gestures.ts
index ea4f7bb0ff..851fd38274 100644
--- a/ionic/components/menu/menu-gestures.ts
+++ b/ionic/components/menu/menu-gestures.ts
@@ -1,9 +1,9 @@
import {Menu} from './menu';
import {SlideEdgeGesture} from '../../gestures/slide-edge-gesture';
-import * as util from 'ionic/util';
+import * as util from '../../util';
-class MenuContentGesture extends SlideEdgeGesture {
+export class MenuContentGesture extends SlideEdgeGesture {
constructor(menu: Menu, targetEl: Element, options = {}) {
super(targetEl, util.extend({
diff --git a/ionic/components/menu/menu-toggle.ts b/ionic/components/menu/menu-toggle.ts
index fb212f3f47..676717b719 100644
--- a/ionic/components/menu/menu-toggle.ts
+++ b/ionic/components/menu/menu-toggle.ts
@@ -1,4 +1,4 @@
-import {Directive, ElementRef, Optional} from 'angular2/angular2';
+import {Directive, ElementRef, Optional} from 'angular2/core';
import {IonicApp} from '../app/app';
import {ViewController} from '../nav/view-controller';
diff --git a/ionic/components/menu/menu-types.ts b/ionic/components/menu/menu-types.ts
index 6396604c32..1393cbe4c1 100644
--- a/ionic/components/menu/menu-types.ts
+++ b/ionic/components/menu/menu-types.ts
@@ -1,5 +1,5 @@
import {Menu} from './menu';
-import {Animation} from 'ionic/animations/animation';
+import {Animation} from '../../animations/animation';
/**
diff --git a/ionic/components/menu/menu.ts b/ionic/components/menu/menu.ts
index 49e32d47b1..927767ee8b 100644
--- a/ionic/components/menu/menu.ts
+++ b/ionic/components/menu/menu.ts
@@ -1,4 +1,4 @@
-import {Component, forwardRef, Directive, Host, EventEmitter, ElementRef} from 'angular2/angular2';
+import {Component, forwardRef, Directive, Host, EventEmitter, ElementRef} from 'angular2/core';
import {Ion} from '../ion';
import {IonicApp} from '../app/app';
diff --git a/ionic/components/modal/modal.ts b/ionic/components/modal/modal.ts
index 83f611447f..dc527d3902 100644
--- a/ionic/components/modal/modal.ts
+++ b/ionic/components/modal/modal.ts
@@ -1,9 +1,9 @@
-import {Injectable} from 'angular2/angular2';
+import {Injectable, Type} from 'angular2/core';
import {OverlayController} from '../overlay/overlay-controller';
import {Config} from '../../config/config';
import {Animation} from '../../animations/animation';
-import {extend} from 'ionic/util';
+import {extend} from '../../util';
/**
* The Modal is a content pane that can go over the user's current page.
diff --git a/ionic/components/nav/nav-controller.ts b/ionic/components/nav/nav-controller.ts
index 0ef0f998e5..7042c9008e 100644
--- a/ionic/components/nav/nav-controller.ts
+++ b/ionic/components/nav/nav-controller.ts
@@ -1,5 +1,5 @@
-import {ChangeDetectorRef, Compiler, ElementRef, Injector, provide, NgZone, AppViewManager, Renderer} from 'angular2/angular2';
-import {wtfLeave, wtfCreateScope, WtfScopeFn, wtfStartTimeRange, wtfEndTimeRange} from 'angular2/angular2';
+import {ChangeDetectorRef, Compiler, ElementRef, Injector, provide, NgZone, AppViewManager, Renderer} from 'angular2/core';
+import {wtfLeave, wtfCreateScope, WtfScopeFn, wtfStartTimeRange, wtfEndTimeRange} from 'angular2/instrumentation';
import {Ion} from '../ion';
import {IonicApp} from '../app/app';
diff --git a/ionic/components/nav/nav-push.ts b/ionic/components/nav/nav-push.ts
index 0a1cbaeef9..b0e697d33c 100644
--- a/ionic/components/nav/nav-push.ts
+++ b/ionic/components/nav/nav-push.ts
@@ -1,4 +1,4 @@
-import {Directive, Optional} from 'angular2/angular2';
+import {Directive, Optional} from 'angular2/core';
import {NavController} from './nav-controller';
import {NavRegistry} from './nav-registry';
diff --git a/ionic/components/nav/nav-router.ts b/ionic/components/nav/nav-router.ts
index a7c17beac1..72f1382792 100644
--- a/ionic/components/nav/nav-router.ts
+++ b/ionic/components/nav/nav-router.ts
@@ -1,4 +1,4 @@
-import {Directive, ElementRef, DynamicComponentLoader, Attribute} from 'angular2/angular2';
+import {Directive, ElementRef, DynamicComponentLoader, Attribute} from 'angular2/core';
import {
RouterOutlet,
Router,
diff --git a/ionic/components/nav/nav.ts b/ionic/components/nav/nav.ts
index 94ae9a877d..510e697a08 100644
--- a/ionic/components/nav/nav.ts
+++ b/ionic/components/nav/nav.ts
@@ -1,4 +1,4 @@
-import {ChangeDetectorRef, Component, Directive, ElementRef, Host, Optional, forwardRef, Inject, NgZone, Compiler, AppViewManager, Renderer, ViewContainerRef} from 'angular2/angular2';
+import {ChangeDetectorRef, Component, Directive, ElementRef, Host, Optional, forwardRef, Inject, NgZone, Compiler, AppViewManager, Renderer, ViewContainerRef} from 'angular2/core';
import {IonicApp} from '../app/app';
import {Config} from '../../config/config';
diff --git a/ionic/components/nav/swipe-back.ts b/ionic/components/nav/swipe-back.ts
index 96b59168cd..3f1b29c15b 100644
--- a/ionic/components/nav/swipe-back.ts
+++ b/ionic/components/nav/swipe-back.ts
@@ -1,4 +1,4 @@
-import {SlideEdgeGesture} from 'ionic/gestures/slide-edge-gesture';
+import {SlideEdgeGesture} from '../../gestures/slide-edge-gesture';
export class SwipeBackGesture extends SlideEdgeGesture {
diff --git a/ionic/components/nav/test/basic/index.ts b/ionic/components/nav/test/basic/index.ts
index 4352bc6bc0..ad60028ea3 100644
--- a/ionic/components/nav/test/basic/index.ts
+++ b/ionic/components/nav/test/basic/index.ts
@@ -1,4 +1,4 @@
-import {Component} from 'angular2/angular2';
+import {Component} from 'angular2/core';
import {App, NavController} from 'ionic/ionic';
import {Page, Config, IonicApp} from 'ionic/ionic';
import {NavParams, NavController, ViewController, IONIC_DIRECTIVES} from 'ionic/ionic';
diff --git a/ionic/components/navbar/navbar.ts b/ionic/components/navbar/navbar.ts
index 517ff91d72..e1db15b35b 100644
--- a/ionic/components/navbar/navbar.ts
+++ b/ionic/components/navbar/navbar.ts
@@ -1,4 +1,4 @@
-import {Component, Directive, Optional, ElementRef, Renderer, TemplateRef, forwardRef, Inject, ViewContainerRef} from 'angular2/angular2';
+import {Component, Directive, Optional, ElementRef, Renderer, TemplateRef, forwardRef, Inject, ViewContainerRef} from 'angular2/core';
import {Ion} from '../ion';
import {Icon} from '../icon/icon';
diff --git a/ionic/components/overlay/overlay-controller.ts b/ionic/components/overlay/overlay-controller.ts
index d38b150911..4435381af8 100644
--- a/ionic/components/overlay/overlay-controller.ts
+++ b/ionic/components/overlay/overlay-controller.ts
@@ -1,5 +1,5 @@
import {Animation} from '../../animations/animation';
-import {extend} from 'ionic/util';
+import {extend} from '../../util';
/**
diff --git a/ionic/components/overlay/overlay.ts b/ionic/components/overlay/overlay.ts
index bb708d182f..f21f461fd4 100644
--- a/ionic/components/overlay/overlay.ts
+++ b/ionic/components/overlay/overlay.ts
@@ -1,4 +1,4 @@
-import {ChangeDetectorRef, Component, ElementRef, Compiler, AppViewManager, NgZone, Renderer} from 'angular2/angular2';
+import {ChangeDetectorRef, Component, ElementRef, Compiler, AppViewManager, NgZone, Renderer} from 'angular2/core';
import {IonicApp} from '../app/app';
import {Config} from '../../config/config';
diff --git a/ionic/components/popup/popup.ts b/ionic/components/popup/popup.ts
index f2cd107d60..c5b37547fe 100644
--- a/ionic/components/popup/popup.ts
+++ b/ionic/components/popup/popup.ts
@@ -1,5 +1,5 @@
-import {FORM_DIRECTIVES, NgControl, NgControlGroup,
- Component, ElementRef, Injectable, NgClass, NgIf, NgFor, Renderer} from 'angular2/angular2';
+import {Component, ElementRef, Injectable, Renderer} from 'angular2/core';
+import {NgClass, NgIf, NgFor, FORM_DIRECTIVES} from 'angular2/common';
import {OverlayController} from '../overlay/overlay-controller';
import {Config} from '../../config/config';
diff --git a/ionic/components/radio/radio.ts b/ionic/components/radio/radio.ts
index e890b6a624..777b500056 100644
--- a/ionic/components/radio/radio.ts
+++ b/ionic/components/radio/radio.ts
@@ -1,4 +1,5 @@
-import {Component, Directive, ElementRef, Host, Optional, NgControl, Query, QueryList} from 'angular2/angular2';
+import {Component, Directive, ElementRef, Host, Optional, Query, QueryList} from 'angular2/core';
+import {NgControl} from 'angular2/common';
import {Config} from '../../config/config';
import {Ion} from '../ion';
diff --git a/ionic/components/radio/test/basic/index.ts b/ionic/components/radio/test/basic/index.ts
index a14701f71b..566d380a24 100644
--- a/ionic/components/radio/test/basic/index.ts
+++ b/ionic/components/radio/test/basic/index.ts
@@ -9,7 +9,7 @@ import {
NgControlName,
NgFormModel,
FormBuilder
-} from 'angular2/angular2';
+} from 'angular2/common';
@App({
diff --git a/ionic/components/scroll/pull-to-refresh.ts b/ionic/components/scroll/pull-to-refresh.ts
index 2dc200cb01..bb5816234b 100644
--- a/ionic/components/scroll/pull-to-refresh.ts
+++ b/ionic/components/scroll/pull-to-refresh.ts
@@ -1,8 +1,9 @@
-import {Component, NgIf, NgClass, ElementRef, EventEmitter, Host} from 'angular2/angular2'
+import {Component, ElementRef, EventEmitter, Host} from 'angular2/core'
+import {NgIf, NgClass} from 'angular2/common';
import {Content} from '../content/content';
-import * as util from 'ionic/util';
-import {raf, ready, CSS} from 'ionic/util/dom';
+import * as util from '../../util';
+import {raf, ready, CSS} from '../../util/dom';
/**
diff --git a/ionic/components/scroll/scroll.ts b/ionic/components/scroll/scroll.ts
index a6bcc1ae6d..ec0bf9dc54 100644
--- a/ionic/components/scroll/scroll.ts
+++ b/ionic/components/scroll/scroll.ts
@@ -1,4 +1,4 @@
-import {Component, ElementRef, onInit} from 'angular2/angular2';
+import {Component, ElementRef, onInit} from 'angular2/core';
import {Ion} from '../ion';
import {Config} from '../../config/config';
@@ -6,7 +6,7 @@ import {Gesture} from '../../gestures/gesture';
import {CSS} from '../../util/dom';
import {Animation} from '../../animations/animation';
-import * as util from 'ionic/util';
+import * as util from '../../util';
/**
* @name Scroll
diff --git a/ionic/components/searchbar/searchbar.ts b/ionic/components/searchbar/searchbar.ts
index 54a263e1ad..3266be9e36 100644
--- a/ionic/components/searchbar/searchbar.ts
+++ b/ionic/components/searchbar/searchbar.ts
@@ -1,4 +1,5 @@
-import {ElementRef, Pipe, NgControl, Renderer, FORM_DIRECTIVES, NgIf, NgClass, Directive, Host, forwardRef, ViewChild} from 'angular2/angular2';
+import {ElementRef, Renderer, Directive, Host, forwardRef, ViewChild} from 'angular2/core';
+import {NgIf, NgClass, NgControl, FORM_DIRECTIVES} from 'angular2/common';
import {Ion} from '../ion';
import {Config} from '../../config/config';
diff --git a/ionic/components/searchbar/test/basic/index.ts b/ionic/components/searchbar/test/basic/index.ts
index fe6524bd8f..90974c444e 100644
--- a/ionic/components/searchbar/test/basic/index.ts
+++ b/ionic/components/searchbar/test/basic/index.ts
@@ -1,4 +1,4 @@
-import {NgControl, FORM_DIRECTIVES, FormBuilder, Validators, Control, ControlGroup} from 'angular2/angular2';
+import {NgControl, FORM_DIRECTIVES, FormBuilder, Validators, Control, ControlGroup} from 'angular2/common';
import {App} from 'ionic/ionic';
import {SearchPipe} from 'ionic/components/searchbar/searchbar';
diff --git a/ionic/components/searchbar/test/floating/index.ts b/ionic/components/searchbar/test/floating/index.ts
index 408cb474c8..53120a6352 100644
--- a/ionic/components/searchbar/test/floating/index.ts
+++ b/ionic/components/searchbar/test/floating/index.ts
@@ -1,4 +1,4 @@
-import {FORM_DIRECTIVES, FormBuilder, Validators, Control, ControlGroup} from 'angular2/angular2';
+import {FORM_DIRECTIVES, FormBuilder, Validators, Control, ControlGroup} from 'angular2/common';
import {App} from 'ionic/ionic';
import {SearchPipe} from 'ionic/components/searchbar/searchbar';
diff --git a/ionic/components/searchbar/test/model/index.ts b/ionic/components/searchbar/test/model/index.ts
index a240add794..9aeda952f4 100644
--- a/ionic/components/searchbar/test/model/index.ts
+++ b/ionic/components/searchbar/test/model/index.ts
@@ -1,4 +1,4 @@
-import {NgControl, FORM_DIRECTIVES, FormBuilder, Validators, Control, ControlGroup} from 'angular2/angular2';
+import {NgControl, FORM_DIRECTIVES, FormBuilder, Validators, Control, ControlGroup} from 'angular2/common';
import {App} from 'ionic/ionic';
import {SearchPipe} from 'ionic/components/searchbar/searchbar';
diff --git a/ionic/components/segment/segment.ts b/ionic/components/segment/segment.ts
index d5793f67ff..122b045198 100644
--- a/ionic/components/segment/segment.ts
+++ b/ionic/components/segment/segment.ts
@@ -1,4 +1,5 @@
-import {Directive, Renderer, ElementRef, Host, Optional, NgControl} from 'angular2/angular2';
+import {Directive, Renderer, ElementRef, Host, Optional} from 'angular2/core';
+import {NgControl} from 'angular2/common';
import {Ion} from '../ion';
import {Config} from '../../config/config';
diff --git a/ionic/components/segment/test/basic/index.ts b/ionic/components/segment/test/basic/index.ts
index 635578c552..ae4873cca8 100644
--- a/ionic/components/segment/test/basic/index.ts
+++ b/ionic/components/segment/test/basic/index.ts
@@ -1,4 +1,4 @@
-import {FORM_DIRECTIVES, FormBuilder, Validators, Control, ControlGroup} from 'angular2/angular2';
+import {FORM_DIRECTIVES, FormBuilder, Validators, Control, ControlGroup} from 'angular2/common';
import {App} from 'ionic/ionic';
diff --git a/ionic/components/segment/test/nav/index.ts b/ionic/components/segment/test/nav/index.ts
index e5474d8a48..6722218006 100644
--- a/ionic/components/segment/test/nav/index.ts
+++ b/ionic/components/segment/test/nav/index.ts
@@ -1,4 +1,4 @@
-import {FORM_DIRECTIVES, FormBuilder, Validators, Control, ControlGroup} from 'angular2/angular2';
+import {FORM_DIRECTIVES, FormBuilder, Validators, Control, ControlGroup} from 'angular2/common';
import {App, Page} from 'ionic/ionic';
diff --git a/ionic/components/show-hide-when/show-hide-when.ts b/ionic/components/show-hide-when/show-hide-when.ts
index 3c150bdf25..f8c633d3ab 100644
--- a/ionic/components/show-hide-when/show-hide-when.ts
+++ b/ionic/components/show-hide-when/show-hide-when.ts
@@ -1,9 +1,9 @@
-import {Directive, Attribute, NgZone} from 'angular2/angular2'
+import {Directive, Attribute, NgZone} from 'angular2/core'
import {Platform} from '../../platform/platform';
-class DisplayWhen {
+export class DisplayWhen {
constructor(conditions, platform, ngZone) {
this.isMatch = false;
diff --git a/ionic/components/show-hide-when/test/basic/index.ts b/ionic/components/show-hide-when/test/basic/index.ts
index 49e605090c..611ee2dc2a 100644
--- a/ionic/components/show-hide-when/test/basic/index.ts
+++ b/ionic/components/show-hide-when/test/basic/index.ts
@@ -9,7 +9,7 @@ import {
NgControlName,
NgFormModel,
FormBuilder
-} from 'angular2/angular2';
+} from 'angular2/common';
@App({
templateUrl: 'main.html'
diff --git a/ionic/components/slides/slides.ts b/ionic/components/slides/slides.ts
index 5ec9763846..2fa2d72d70 100644
--- a/ionic/components/slides/slides.ts
+++ b/ionic/components/slides/slides.ts
@@ -1,13 +1,14 @@
-import {Directive, Component, ElementRef, Host, NgClass, EventEmitter} from 'angular2/angular2';
+import {Directive, Component, ElementRef, Host, EventEmitter} from 'angular2/core';
+import {NgClass} from 'angular2/common';
import {Ion} from '../ion';
-import {Animation} from 'ionic/animations/animation';
-import {Gesture} from 'ionic/gestures/gesture';
-import {DragGesture} from 'ionic/gestures/drag-gesture';
+import {Animation} from '../../animations/animation';
+import {Gesture} from '../../gestures/gesture';
+import {DragGesture} from '../../gestures/drag-gesture';
import {Config} from '../../config/config';
-import {dom} from 'ionic/util';
+import {dom} from '../../util';
import {CSS} from '../../util/dom';
-import * as util from 'ionic/util';
+import * as util from '../../util';
import {Swiper} from './swiper-widget';
import {Scroll} from '../scroll/scroll';
diff --git a/ionic/components/slides/test/scroll/index.ts b/ionic/components/slides/test/scroll/index.ts
index d35afbe1b4..edfdcec9b6 100644
--- a/ionic/components/slides/test/scroll/index.ts
+++ b/ionic/components/slides/test/scroll/index.ts
@@ -1,5 +1,4 @@
import {App} from 'ionic/ionic';
-import {NgIf} from 'angular/angular';
@App({
templateUrl: 'main.html',
diff --git a/ionic/components/tabs/tab.ts b/ionic/components/tabs/tab.ts
index 131f6e7005..2ae8f7b364 100644
--- a/ionic/components/tabs/tab.ts
+++ b/ionic/components/tabs/tab.ts
@@ -1,4 +1,4 @@
-import {ChangeDetectorRef, Component, Directive, Host, ElementRef, Compiler, AppViewManager, NgZone, Renderer} from 'angular2/angular2';
+import {ChangeDetectorRef, Component, Directive, Host, ElementRef, Compiler, AppViewManager, NgZone, Renderer} from 'angular2/core';
import {IonicApp} from '../app/app';
import {Config} from '../../config/config';
diff --git a/ionic/components/tabs/tabs.ts b/ionic/components/tabs/tabs.ts
index fa160401ff..8ef6c6716f 100644
--- a/ionic/components/tabs/tabs.ts
+++ b/ionic/components/tabs/tabs.ts
@@ -1,4 +1,5 @@
-import {Directive, ElementRef, Optional, Host, NgFor, NgIf, forwardRef, ViewContainerRef} from 'angular2/angular2';
+import {Directive, ElementRef, Optional, Host, forwardRef, ViewContainerRef} from 'angular2/core';
+import {NgFor, NgIf} from 'angular2/common';
import {Ion} from '../ion';
import {Attr} from '../app/id';
diff --git a/ionic/components/tabs/test/ghost/index.ts b/ionic/components/tabs/test/ghost/index.ts
index cb31731976..a4816bb487 100644
--- a/ionic/components/tabs/test/ghost/index.ts
+++ b/ionic/components/tabs/test/ghost/index.ts
@@ -1,6 +1,6 @@
import {App, Page, NavController, Tab} from 'ionic/ionic';
-import {ContentChild, QueryList, ViewChildren} from 'angular2/angular2';
+import {ContentChild, QueryList, ViewChildren} from 'angular2/core';
//
// Tab 1
diff --git a/ionic/components/tap-click/tap-click.ts b/ionic/components/tap-click/tap-click.ts
index 6b85bc268e..03155645fd 100644
--- a/ionic/components/tap-click/tap-click.ts
+++ b/ionic/components/tap-click/tap-click.ts
@@ -1,4 +1,4 @@
-import {Injectable, NgZone} from 'angular2/angular2';
+import {Injectable, NgZone} from 'angular2/core';
import {IonicApp} from '../app/app';
import {Config} from '../../config/config';
diff --git a/ionic/components/text-input/label.ts b/ionic/components/text-input/label.ts
index 507f69e3d7..01146d5052 100644
--- a/ionic/components/text-input/label.ts
+++ b/ionic/components/text-input/label.ts
@@ -1,4 +1,4 @@
-import {Directive, Optional, ElementRef, Renderer} from 'angular2/angular2';
+import {Directive, Optional, ElementRef, Renderer} from 'angular2/core';
import {Config} from '../../config/config';
import {TextInput} from './text-input';
diff --git a/ionic/components/text-input/test/form-inputs/index.ts b/ionic/components/text-input/test/form-inputs/index.ts
index 1eb3f9b37f..9d55a29d72 100644
--- a/ionic/components/text-input/test/form-inputs/index.ts
+++ b/ionic/components/text-input/test/form-inputs/index.ts
@@ -1,5 +1,5 @@
import {App} from 'ionic/ionic';
-import {FormBuilder, Validators} from 'angular2/angular2';
+import {FormBuilder, Validators} from 'angular2/common';
@App({
diff --git a/ionic/components/text-input/test/inline-labels/index.ts b/ionic/components/text-input/test/inline-labels/index.ts
index 261c4ab4ca..a9bdbc8a78 100644
--- a/ionic/components/text-input/test/inline-labels/index.ts
+++ b/ionic/components/text-input/test/inline-labels/index.ts
@@ -7,7 +7,6 @@ import {App} from 'ionic/ionic';
class E2EApp {
submit(ev) {
- debugger
}
}
diff --git a/ionic/components/text-input/text-input.ts b/ionic/components/text-input/text-input.ts
index 48543eea0c..c2500f0608 100644
--- a/ionic/components/text-input/text-input.ts
+++ b/ionic/components/text-input/text-input.ts
@@ -1,4 +1,5 @@
-import {Component, Directive, Attribute, NgIf, forwardRef, Host, Optional, ElementRef, Renderer, Attribute, NgControl} from 'angular2/angular2';
+import {Component, Directive, Attribute, forwardRef, Host, Optional, ElementRef, Renderer} from 'angular2/core';
+import {NgIf, NgControl} from 'angular2/common';
import {NavController} from '../nav/nav-controller';
import {Config} from '../../config/config';
diff --git a/ionic/components/toggle/test/basic/index.ts b/ionic/components/toggle/test/basic/index.ts
index dde96c875f..1d8c6a59c3 100644
--- a/ionic/components/toggle/test/basic/index.ts
+++ b/ionic/components/toggle/test/basic/index.ts
@@ -9,7 +9,7 @@ import {
NgControlName,
NgFormModel,
FormBuilder
-} from 'angular2/angular2';
+} from 'angular2/common';
@App({
templateUrl: 'main.html'
diff --git a/ionic/components/toggle/toggle.ts b/ionic/components/toggle/toggle.ts
index e5de92d6c8..b278bdccb6 100644
--- a/ionic/components/toggle/toggle.ts
+++ b/ionic/components/toggle/toggle.ts
@@ -1,4 +1,5 @@
-import {Component, Directive, ElementRef, Host, Optional, NgControl, Inject, forwardRef} from 'angular2/angular2';
+import {Component, Directive, ElementRef, Host, Optional, Inject, forwardRef} from 'angular2/core';
+import {NgControl} from 'angular2/common';
import {Form} from '../../util/form';
import {Config} from '../../config/config';
diff --git a/ionic/components/toolbar/toolbar.ts b/ionic/components/toolbar/toolbar.ts
index f6cd4f608b..4f59f7d9f8 100644
--- a/ionic/components/toolbar/toolbar.ts
+++ b/ionic/components/toolbar/toolbar.ts
@@ -1,4 +1,4 @@
-import {Component, Directive, Host, ElementRef, Optional, forwardRef, Inject, ContentChildren, ContentChild, QueryList} from 'angular2/angular2';
+import {Component, Directive, Host, ElementRef, Optional, forwardRef, Inject, ContentChildren, ContentChild, QueryList} from 'angular2/core';
import {Ion} from '../ion';
import {Config} from '../../config/config';
diff --git a/ionic/config/bootstrap.ts b/ionic/config/bootstrap.ts
index 94bd377a13..e4d284bf6a 100644
--- a/ionic/config/bootstrap.ts
+++ b/ionic/config/bootstrap.ts
@@ -1,4 +1,4 @@
-import {bootstrap, provide} from 'angular2/angular2';
+import {provide, Provider} from 'angular2/core';
import {ROUTER_PROVIDERS, LocationStrategy, HashLocationStrategy} from 'angular2/router';
import {HTTP_PROVIDERS} from 'angular2/http';
diff --git a/ionic/config/decorators.ts b/ionic/config/decorators.ts
index dd62170b11..d084e2db3c 100644
--- a/ionic/config/decorators.ts
+++ b/ionic/config/decorators.ts
@@ -1,155 +1,3 @@
-import {Component, bootstrap} from 'angular2/angular2'
-
-import {TapClick} from '../components/tap-click/tap-click';
-import {pascalCaseToDashCase} from '../util/util';
-import {ionicProviders} from './bootstrap';
-import {IONIC_DIRECTIVES} from './directives';
-
-
-/**
- * _For more information on how pages are created, see the [NavController API
- * reference](../../components/nav/NavController/#creating_pages)._
- *
- * The Page decorator indicates that the decorated class is an Ionic
- * navigation component, meaning it can be navigated to using a NavController.
- *
- * Pages have all [IONIC_DIRECTIVES](../IONIC_DIRECTIVES/), which include
- * all Ionic components and directives, as well as Angular's [CORE_DIRECTIVES](https://angular.io/docs/js/latest/api/core/CORE_DIRECTIVES-const.html)
- * and [FORM_DIRECTIVES](https://angular.io/docs/js/latest/api/core/FORM_DIRECTIVES-const.html),
- * already provided to them, so you only need to supply custom components and
- * directives to your pages:
- *
- * ```ts
- * @Page({
- * template: `
- *