i put the break in changes

This commit is contained in:
Adam Bradley
2015-05-11 22:33:32 -05:00
parent 466e976c76
commit d8eea75736
69 changed files with 651 additions and 502 deletions

View File

@ -1,15 +1,29 @@
#### Building & Running
- `gulp watch`
- `httpster`
- `open http://localhost:9000/e2e/aside/basic/index.html`
- Follow the structure found in src/components/aside/examples/basic
to create more examples.
* The biggest thing to remember: your app has to import its dependencies with the `app/` prefix.
For example `import {Apple} from 'apple';` would import apple.js in your example app.
_** WARNING: This is a temporary hack **_
1. At the root of your `ionic2` directory/repo, run: `gulp update.angular`. This will get the latest version of Angular2 master and install it as a sibling directory `../angular` to wherever your `ionic2` directory is. (It'll take a while to npm install angular2, so go grab a beer).
2. In the `ionic2` working directory, run `gulp watch`. This will copy ionic2 components and test files to the correct angular directories as you're developing.
3. In another terminal, `cd` into the `../angular` directory, and run `gulp serve.js.dev`. This will build out ionic examples too.
4. Go to [http://localhost:8000/examples/src/ionic/](http://localhost:8000/examples/src/ionic/)
5. Stay cool
_** WARNING: This is a temporary hack **_
#### Update Angular
#### Things you'll probably need to fix
- `@Decorator` is now just `@Directive`
- Components must use an element selector
- NgElement is not longer a thing, it's now ElementRef. Stuff needs to be fixed.
- All `main.js` test files were renamed to `index.js` to work with angular's build
- imports that are relative paths should start with `./`. For example, instead of `path/module` it should be `./path/module`
- `Component`, `Directive` and `View` should NOT be imported from `angular2/angular2`. You'll probably get "No Directive annotation found on Content" when the wrong import is referenced.
- Import those instead from:
```
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
```
./scripts/build/update-angular.sh

View File

@ -13,34 +13,44 @@ var gulpif = require('gulp-if');
var rename = require('gulp-rename');
var sass = require('gulp-sass');
var through2 = require('through2');
var exec = require('child_process').exec;
var spawn = require('child_process').spawn;
var runSequence = require('run-sequence');
var watch = require('gulp-watch');
// !!! TEMP HACK !!!
// first run ./update-angular.sh
gulp.task('build', function(done) {
if (!fs.existsSync('./dist/angular')) {
console.error('hey yo, run "gulp update.angular" first');
return;
}
gulp.task('watch', function() {
runSequence(
'clean',
'ionic.copy.js',
'ionic.examples',
'angular.build',
done
);
'sass',
function() {
watch('ionic/**/*.js', function() {
gulp.start('ionic.copy.js');
});
watch('ionic/components/*/test/**/*', function() {
gulp.start('ionic.examples');
});
watch('ionic/components/**/*.scss', function() {
gulp.start('sass');
});
})
});
gulp.task('clean', function(done) {
del(['../angular/modules/ionic, ./angular/modules/examples/src/ionic'], done);
});
gulp.task('ionic.copy.js', function(done) {
console.log('copying ionic src JS to dist/angular/modules/ionic...');
return gulp.src('ionic/**/*.js')
.pipe(gulp.dest('dist/angular/modules/ionic'));
return gulp.src(['ionic/**/*.js', '!ionic/components/*/test/**/*'])
.pipe(gulp.dest('../angular/modules/ionic'));
});
@ -51,12 +61,11 @@ gulp.task('ionic.examples', function() {
// Get each test folder with gulp.src
return gulp.src('ionic/components/*/test/*/**/*')
.pipe(cached('ionicexamples'))
.pipe(rename(function(file) {
file.dirname = file.dirname.replace(path.sep + 'test' + path.sep, path.sep)
}))
.pipe(gulpif(/main.js$/, processMain()))
.pipe(gulp.dest('dist/angular/modules/examples/src/ionic'))
.pipe(gulpif(/index.js$/, processMain()))
.pipe(gulp.dest('../angular/modules/examples/src/ionic'))
function processMain() {
return through2.obj(function(file, enc, next) {
@ -73,73 +82,33 @@ gulp.task('ionic.examples', function() {
});
gulp.task('serve', function(done) {
runSequence(
'build',
'angular.serve',
done
);
});
gulp.task('angular.serve', function(done) {
var serve = spawn('gulp', ['serve.js.dev'], {
cwd: './dist/angular'
});
serve.stdout.on('data', function (data) {
console.log('' + data);
});
serve.stderr.on('data', function (data) {
console.log('' + data);
});
serve.on('close', function (code) {
console.log('gulp serve exited with code ' + code);
});
});
gulp.task('angular.build', function(done) {
var child = exec('gulp build.js.dev', {
cwd: './dist/angular'
}, function (error, stdout, stderr) {
console.log('stdout: ' + stdout);
console.log('stderr: ' + stderr);
if (error !== null) {
console.log('exec error: ' + error);
gulp.task('sass', function() {
return gulp.src('ionic/ionic.scss')
.pipe(sass({
onError: function(err) {
console.log(err)
}
done();
});
}))
.pipe(gulp.dest('dist/css'));
});
gulp.task('update.angular', function(done) {
if (!fs.existsSync('./dist')) {
fs.mkdirSync('./dist');
}
if (!fs.existsSync('./dist/angular')) {
fs.mkdirSync('./dist/angular');
if (!fs.existsSync('../angular')) {
fs.mkdirSync('../angular');
console.log('cloning angular master...');
exec('git clone git@github.com:angular/angular ./dist/angular', function() {
exec('git clone git@github.com:angular/angular ../angular', function() {
npmInstall();
});
} else {
console.log('angular master: cleaning modules');
del(['dist/angular/modules'], {cwd: './dist/angular'}, function() {
del(['../angular/modules'], function() {
console.log('angular master: reset --hard...');
exec('git reset --hard origin/master', {cwd: './dist/angular'}, function () {
exec('git reset --hard origin/master', {cwd: '../angular'}, function () {
console.log('angular master: git pull origin master...');
exec('git pull origin master', function () {
@ -152,7 +121,7 @@ gulp.task('update.angular', function(done) {
function npmInstall() {
console.log('angular master: npm install (may take a while, chill out)...');
exec('npm install', {cwd: './dist/angular'}, function () {
exec('npm install', {cwd: '../angular'}, function () {
done();
});
}
@ -161,25 +130,20 @@ gulp.task('update.angular', function(done) {
require('./scripts/snapshot/snapshot.task')(gulp, argv, buildConfig);
gulp.task('default', ['clean'], function() {
gulp.run('build');
});
gulp.task('watch', ['default'], function() {
gulp.watch(buildConfig.src.scss, ['sass'])
gulp.watch([].concat(
buildConfig.src.js, buildConfig.src.html,
'scripts/e2e/index.template.html'
), ['e2e'])
gulp.watch([].concat(
buildConfig.src.e2e, buildConfig.src.html,
'scripts/e2e/index.template.html'
), ['ionic-js'])
});
// gulp.task('watch', ['default'], function() {
// gulp.watch(buildConfig.src.scss, ['sass'])
// gulp.watch([].concat(
// buildConfig.src.js, buildConfig.src.html,
// 'scripts/e2e/index.template.html'
// ), ['e2e'])
// gulp.watch([].concat(
// buildConfig.src.e2e, buildConfig.src.html,
// 'scripts/e2e/index.template.html'
// ), ['ionic-js'])
// });
gulp.task('karma', function() {
return karma.start({ configFile: __dirname + '/scripts/test/karma.conf.js' })
@ -189,26 +153,12 @@ gulp.task('karma-watch', function() {
return karma.start({ configFile: __dirname + '/scripts/test/karma-watch.conf.js' })
});
gulp.task('sass', function() {
return gulp.src('ionic/ionic.scss')
.pipe(sass({
onError: function(err) {
console.log(err)
}
}))
.pipe(gulp.dest('dist/css'));
});
gulp.task('fonts', function() {
return gulp.src('ionic/components/icon/fonts/**/*')
.pipe(gulp.dest('dist/fonts'));
});
gulp.task('clean', function(done) {
del(['dist/e2e'], done);
});

View File

@ -0,0 +1,21 @@
import {bootstrap} from 'angular2/angular2'
import {Component} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
import {ActionMenu} from 'ionic/components/action-menu/action-menu';
@Component({ selector: 'ion-app' })
@View({
templateUrl: 'main.html',
directives: [ActionMenu]
})
class IonicApp {
constructor() {
console.log('IonicApp Start')
}
}
export function main() {
bootstrap(IonicApp);
}

View File

@ -1,16 +0,0 @@
import {Component, View, bootstrap} from 'angular2/angular2';
import {ActionMenu} from 'ionic/components/action-menu/action-menu';
@Component({ selector: '[ion-app]' })
@View({
templateUrl: 'main.html',
directives: [ActionMenu]
})
class IonicApp {
constructor() {
console.log('IonicApp Start')
}
}
bootstrap(IonicApp)

View File

@ -1,8 +1,11 @@
import {Component, View, bootstrap} from 'angular2/angular2';
import {bootstrap} from 'angular2/angular2'
import {Component} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
import {Alert} from 'ionic/components/alert/alert';
@Component({ selector: '[ion-app]' })
@Component({ selector: 'ion-app' })
@View({
templateUrl: 'main.html',
directives: [Alert]
@ -19,4 +22,6 @@ class IonicApp {
}
}
bootstrap(IonicApp)
export function main() {
bootstrap(IonicApp);
}

View File

@ -1,4 +1,7 @@
import {Component, Decorator, View, NgElement, bootstrap} from 'angular2/angular2';
import {bootstrap} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
import {Animation} from 'ionic/ionic';
let opacity = 0.2;
@ -6,7 +9,7 @@ let rotateZ = '180deg';
let translateX = '100px';
let scale = 0.6;
@Component({ selector: '[ion-app]' })
@Component({ selector: 'ion-app' })
@View({
templateUrl: 'main.html'
})
@ -143,4 +146,6 @@ class IonicApp {
}
bootstrap(IonicApp)
export function main() {
bootstrap(IonicApp);
}

View File

@ -1,5 +1,8 @@
//import {Router} from 'ionic/routing/router'
import {For, Component, View, Parent, bootstrap} from 'angular2/angular2'
import {For, Parent, bootstrap} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
import {FormBuilder, Validators, FormDirectives, ControlGroup} from 'angular2/forms';
import {Log} from 'ionic/util'
@ -152,7 +155,7 @@ class SplashPage {
/**
* Main app entry point
*/
@Component({ selector: '[ion-app]' })
@Component({ selector: 'ion-app' })
@View({
directives: [Nav],
templateUrl: 'main.html'
@ -194,4 +197,6 @@ class IonicApp {
}
}
bootstrap(IonicApp);
export function main() {
bootstrap(IonicApp);
}

View File

@ -1,16 +1,20 @@
import {Descendent, NgElement, Component, View, bootstrap} from 'angular2/angular2';
import {NgElement} from 'angular2/angular2';
import {bootstrap} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
import {bind} from 'angular2/di';
import {Content, Nav, NavPane} from 'ionic/ionic';
import {HackerNews} from 'hn';
import {HNTopStories} from 'pages/top';
@Component({ selector: '[ion-app]' })
@Component({ selector: 'ion-app' })
@View({
templateUrl: 'main.html',
directives: [Content, Nav, NavPane]
})
export class HNApp {
export class IonicApp {
constructor(
@NgElement() element:NgElement
) {
@ -20,5 +24,7 @@ export class HNApp {
}
}
bootstrap(HNApp);
export function main() {
bootstrap(IonicApp);
}

View File

@ -0,0 +1,18 @@
import {bootstrap} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
@Component({ selector: 'ion-app' })
@View({
templateUrl: 'main.html'
})
class IonicApp {
constructor() {
console.log('IonicApp Start')
}
}
export function main() {
bootstrap(IonicApp);
}

View File

@ -1,13 +0,0 @@
import {Component, View, bootstrap} from 'angular2/angular2';
@Component({ selector: '[ion-app]' })
@View({
templateUrl: 'main.html'
})
class IonicApp {
constructor() {
console.log('IonicApp Start')
}
}
bootstrap(IonicApp)

View File

@ -0,0 +1,20 @@
import {bootstrap} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
import {Aside} from 'ionic/components/aside/aside';
@Component({
selector: 'ion-app'
})
@View({
directives: [Aside, Content],
templateUrl: 'main.html'
})
class IonicApp {
}
export function main() {
bootstrap(IonicApp);
}

View File

@ -1,16 +0,0 @@
import {Aside} from 'ionic/components/aside/aside';
import {Content} from 'ionic/components/content/content';
import {View, Component, bootstrap} from 'angular2/angular2';
@Component({
selector: '[ion-app]'
})
@View({
directives: [Aside, Content],
templateUrl: 'main.html'
})
class App {
}
bootstrap(App);

View File

@ -1,18 +1,19 @@
import {NgElement, Decorator} from 'angular2/angular2'
import {NgElement} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {IonicComponent} from 'ionic/config/component'
@Decorator({
@Directive({
selector: 'button, ion-button, [ion-button],.button',
})
export class Button {
constructor(
@NgElement() ngElement:NgElement
//@NgElement() ngElement:NgElement
) {
this.domElement = ngElement.domElement
this.config = Button.config.invoke(this)
//this.domElement = ngElement.domElement
}
}
new IonicComponent(Button, {
enhanceRawElement: true,
propClasses: ['primary', 'secondary', 'danger', 'light', 'stable', 'dark', 'block', 'clear', 'full', 'icon']
})
// new IonicComponent(Button, {
// enhanceRawElement: true,
// propClasses: ['primary', 'secondary', 'danger', 'light', 'stable', 'dark', 'block', 'clear', 'full', 'icon']
// })

View File

@ -0,0 +1,19 @@
import {bootstrap} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
import {Button} from 'ionic/components/button/button'
@Component({ selector: 'ion-app' })
@View({
templateUrl: 'main.html',
directives: [Button]
})
class IonicApp {
constructor() {
}
}
export function main() {
bootstrap(IonicApp);
}

View File

@ -1,14 +0,0 @@
import {Component, View, bootstrap} from 'angular2/angular2'
import {Button} from 'ionic/components/button/button'
@Component({ selector: '[ion-app]' })
@View({
templateUrl: 'main.html',
directives: [Button]
})
class IonicApp {
constructor() {
}
}
bootstrap(IonicApp)

View File

@ -0,0 +1,18 @@
import {bootstrap} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
import {Button} from 'ionic/components/button/button'
@Component({ selector: 'ion-app' })
@View({
templateUrl: 'main.html',
directives: [Button]
})
class IonicApp {}
export function main() {
bootstrap(IonicApp);
}

View File

@ -1,12 +0,0 @@
import {Component, View, bootstrap} from 'angular2/angular2'
import {Button} from 'ionic/components/button/button'
@Component({ selector: '[ion-app]' })
@View({
templateUrl: 'main.html',
directives: [Button]
})
class IonicApp {}
bootstrap(IonicApp)

View File

@ -0,0 +1,18 @@
import {bootstrap} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
import {Button} from 'ionic/components/button/button'
@Component({ selector: 'ion-app' })
@View({
templateUrl: 'main.html',
directives: [Button]
})
class IonicApp {}
export function main() {
bootstrap(IonicApp);
}

View File

@ -1,12 +0,0 @@
import {Component, View, bootstrap} from 'angular2/angular2'
import {Button} from 'ionic/components/button/button'
@Component({ selector: '[ion-app]' })
@View({
templateUrl: 'main.html',
directives: [Button]
})
class IonicApp {}
bootstrap(IonicApp)

View File

@ -0,0 +1,18 @@
import {bootstrap} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
import {Button} from 'ionic/components/button/button'
@Component({ selector: 'ion-app' })
@View({
templateUrl: 'main.html',
directives: [Button]
})
class IonicApp {}
export function main() {
bootstrap(IonicApp);
}

View File

@ -1,12 +0,0 @@
import {Component, View, bootstrap} from 'angular2/angular2'
import {Button} from 'ionic/components/button/button'
@Component({ selector: '[ion-app]' })
@View({
templateUrl: 'main.html',
directives: [Button]
})
class IonicApp {}
bootstrap(IonicApp)

View File

@ -0,0 +1,18 @@
import {bootstrap} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
import {Button} from 'ionic/components/button/button'
@Component({ selector: 'ion-app' })
@View({
templateUrl: 'main.html',
directives: [Button]
})
class IonicApp {}
export function main() {
bootstrap(IonicApp);
}

View File

@ -1,12 +0,0 @@
import {Component, View, bootstrap} from 'angular2/angular2'
import {Button} from 'ionic/components/button/button'
@Component({ selector: '[ion-app]' })
@View({
templateUrl: 'main.html',
directives: [Button]
})
class IonicApp {}
bootstrap(IonicApp)

View File

@ -0,0 +1,18 @@
import {bootstrap} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
import {Button} from 'ionic/components/button/button'
@Component({ selector: 'ion-app' })
@View({
templateUrl: 'main.html',
directives: [Button]
})
class IonicApp {}
export function main() {
bootstrap(IonicApp);
}

View File

@ -1,12 +0,0 @@
import {Component, View, bootstrap} from 'angular2/angular2'
import {Button} from 'ionic/components/button/button'
@Component({ selector: '[ion-app]' })
@View({
templateUrl: 'main.html',
directives: [Button]
})
class IonicApp {}
bootstrap(IonicApp)

View File

@ -0,0 +1,18 @@
import {bootstrap} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
import {Button} from 'ionic/components/button/button'
@Component({ selector: 'ion-app' })
@View({
templateUrl: 'main.html',
directives: [Button]
})
class IonicApp {}
export function main() {
bootstrap(IonicApp);
}

View File

@ -1,12 +0,0 @@
import {Component, View, bootstrap} from 'angular2/angular2'
import {Button} from 'ionic/components/button/button'
@Component({ selector: '[ion-app]' })
@View({
templateUrl: 'main.html',
directives: [Button]
})
class IonicApp {}
bootstrap(IonicApp)

View File

@ -0,0 +1,23 @@
import {bootstrap} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
import {Content} from 'ionic/components/content/content';
import {List} from 'ionic/components/list/list';
@Component({ selector: 'ion-app' })
@View({
templateUrl: 'main.html',
directives: [Content, List]
})
class IonicApp {
constructor() {
console.log('IonicApp Start')
}
}
export function main() {
bootstrap(IonicApp);
}

View File

@ -1,17 +0,0 @@
import {Component, View, bootstrap} from 'angular2/angular2';
import {Content} from 'ionic/components/content/content';
import {List} from 'ionic/components/list/list';
@Component({ selector: '[ion-app]' })
@View({
templateUrl: 'main.html',
directives: [Content, List]
})
class IonicApp {
constructor() {
console.log('IonicApp Start')
}
}
bootstrap(IonicApp)

View File

@ -1,8 +1,11 @@
import {Component, View, bootstrap} from 'angular2/angular2'
import {bootstrap} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
import {FormBuilder, Validators, FormDirectives, ControlGroup} from 'angular2/forms';
import {IONIC_DIRECTIVES} from 'ionic/ionic'
@Component({ selector: '[ion-app]' })
@Component({ selector: 'ion-app' })
@View({
templateUrl: 'main.html',
directives: [FormDirectives].concat(IONIC_DIRECTIVES)
@ -21,4 +24,7 @@ class IonicApp {
}
}
bootstrap(IonicApp)
export function main() {
bootstrap(IonicApp);
}

View File

@ -1,8 +1,6 @@
import {
NgElement,
Component,
View,
} from 'angular2/angular2';
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
@Component({
selector: 'ion-content',

View File

@ -1,10 +1,13 @@
import {Component, View, bootstrap} from 'angular2/angular2';
import {bootstrap} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
import {Content} from 'ionic/components/content/content';
import {Icon} from 'ionic/components/icon/icon';
import {Checkbox} from 'ionic/components/checkbox/checkbox';
import {List} from 'ionic/components/list/list';
@Component({ selector: '[ion-app]' })
@Component({ selector: 'ion-app' })
@View({
templateUrl: 'main.html',
directives: [Content, Icon, Checkbox, List]
@ -15,4 +18,7 @@ class IonicApp {
}
}
bootstrap(IonicApp)
export function main() {
bootstrap(IonicApp);
}

View File

@ -5,7 +5,7 @@ import {Checkbox} from 'ionic/components/checkbox/checkbox';
import {List} from 'ionic/components/list/list';
import {Refresher} from 'ionic/components/scroll/pull-to-refresh';
@Component({ selector: '[ion-app]' })
@Component({ selector: 'ion-app' })
@View({
templateUrl: 'main.html',
directives: [Content, Icon, Checkbox, List, Refresher]
@ -22,4 +22,7 @@ class IonicApp {
}
}
bootstrap(IonicApp)
export function main() {
bootstrap(IonicApp);
}

View File

@ -1,17 +1,16 @@
import {NgElement, Decorator} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {IonicComponent} from 'ionic/config/component'
@Decorator({
@Directive({
selector: 'ion-input'
})
export class Input {
constructor(
@NgElement() ngElement:NgElement
) {
this.domElement = ngElement.domElement
constructor() {
//this.config = Button.config.invoke(this)
console.log('INPUT');
}
}
new IonicComponent(Input, {
})
// new IonicComponent(Input, {
// })

View File

@ -1,15 +1,14 @@
import {NgElement, Decorator} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {IonicComponent} from 'ionic/config/component'
@Decorator({
@Directive({
selector: 'ion-label'
})
export class Label {
constructor(
@NgElement() ngElement:NgElement
) {
this.domElement = ngElement.domElement
constructor() {
}
}
new IonicComponent(Label, {
})
// new IonicComponent(Label, {
// })

View File

@ -1,11 +1,14 @@
import {Component, View, bootstrap} from 'angular2/angular2'
import {bootstrap} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
import {FormBuilder, Validators, FormDirectives, ControlGroup} from 'angular2/forms';
//import {Button, Switch, Form, List, Label, Item, Input, Content} from 'ionic/ionic';
import {IONIC_DIRECTIVES} from 'ionic/ionic'
console.log([FormDirectives].concat(IONIC_DIRECTIVES));
@Component({ selector: '[ion-app]' })
@Component({ selector: 'ion-app' })
@View({
templateUrl: 'main.html',
directives: [FormDirectives].concat(IONIC_DIRECTIVES)
@ -26,4 +29,7 @@ class IonicApp {
}
}
bootstrap(IonicApp)
export function main() {
bootstrap(IonicApp);
}

View File

@ -1,10 +1,11 @@
import {NgElement, Decorator} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
@Decorator({
@Directive({
selector: 'ion-icon,ionicon,icon'
})
export class Icon {
constructor(@NgElement() ngEle:NgElement) {
ngEle.domElement.setAttribute('aria-hidden', 'hidden')
constructor() {
//ngEle.domElement.setAttribute('aria-hidden', 'hidden')
}
}

View File

@ -4,16 +4,18 @@ import {Item, List} from 'ionic/ionic'
import {ItemPrimarySwipeButtons} from 'ionic/components/item/item-swipe-buttons'
@Component({
selector: '[ion-app]'
selector: 'ion-app'
})
@View({
templateUrl: 'main.html',
directives: [Item, List, For, ItemPrimarySwipeButtons]
})
class App{
class IonicApp {
constructor() {
this.items = [1, 2, 3, 4, 5]
}
}
bootstrap(App)
export function main() {
bootstrap(IonicApp);
}

View File

@ -1,19 +1,25 @@
import {Component, View, For, bootstrap} from 'angular2/angular2'
import {bootstrap} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
import {Item, List} from 'ionic/ionic'
import {ItemPrimarySwipeButtons} from 'ionic/components/item/item-swipe-buttons'
@Component({
selector: '[ion-app]'
selector: 'ion-app'
})
@View({
templateUrl: 'main.html',
directives: [Item, List, For, ItemPrimarySwipeButtons]
})
class App{
class IonicApp {
constructor() {
this.items = [1, 2, 3, 4, 5]
}
}
bootstrap(App)
export function main() {
bootstrap(IonicApp);
}

View File

@ -0,0 +1,23 @@
import {bootstrap} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
import {Content} from 'ionic/components/content/content';
import {Layout} from 'ionic/components/layout/layout';
@Component({ selector: 'ion-app' })
@View({
templateUrl: 'main.html',
directives: [Content, Layout]
})
class IonicApp {
constructor() {
console.log('IonicApp Start')
}
}
export function main() {
bootstrap(IonicApp);
}

View File

@ -1,17 +0,0 @@
import {Component, View, bootstrap} from 'angular2/angular2';
import {Content} from 'ionic/components/content/content';
import {Layout} from 'ionic/components/layout/layout';
@Component({ selector: '[ion-app]' })
@View({
templateUrl: 'main.html',
directives: [Content, Layout]
})
class IonicApp {
constructor() {
console.log('IonicApp Start')
}
}
bootstrap(IonicApp)

View File

@ -1,4 +1,6 @@
import {NgElement, Component, View} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
import {IonicComponent} from 'ionic/config/component'
@ -9,14 +11,11 @@ import {IonicComponent} from 'ionic/config/component'
template: `<content></content>`
})
export class List {
constructor(
ngElement: NgElement
) {
this.domElement = ngElement.domElement;
this.config = List.config.invoke(this)
constructor() {
}
}
new IonicComponent(List, {
propClasses: ['inset']
})
// new IonicComponent(List, {
// propClasses: ['inset']
// })

View File

@ -1,10 +1,13 @@
import {Component, View, bootstrap} from 'angular2/angular2';
import {bootstrap} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
import {Content} from 'ionic/components/content/content';
import {List} from 'ionic/components/list/list';
import {Item} from 'ionic/components/item/item';
@Component({ selector: '[ion-app]' })
@Component({ selector: 'ion-app' })
@View({
templateUrl: 'main.html',
directives: [Content, List, Item]
@ -15,4 +18,7 @@ class IonicApp {
}
}
bootstrap(IonicApp)
export function main() {
bootstrap(IonicApp);
}

View File

@ -1,11 +1,11 @@
import {bootstrap} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
import {Nav} from 'ionic/components/nav/nav'
import {Log} from 'ionic/util'
import {FirstPage} from './pages/first-page'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
@Component({ selector: 'ion-app' })
@View({
@ -17,4 +17,6 @@ class IonicApp {
}
}
bootstrap(IonicApp);
export function main() {
bootstrap(IonicApp);
}

View File

@ -1,11 +1,14 @@
import {Component, View, bootstrap} from 'angular2/angular2';
import {bootstrap} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
import {Content} from 'ionic/components/content/content';
import {Icon} from 'ionic/components/icon/icon';
import {RadioGroup} from 'ionic/components/radio/radio-group';
import {RadioButton} from 'ionic/components/radio/radio-button';
@Component({ selector: '[ion-app]' })
@Component({ selector: 'ion-app' })
@View({
templateUrl: 'main.html',
directives: [Content, RadioGroup, RadioButton]
@ -16,4 +19,7 @@ class IonicApp {
}
}
bootstrap(IonicApp)
export function main() {
bootstrap(IonicApp);
}

View File

@ -1,6 +1,9 @@
import {NgElement, EventEmitter, Decorator, Component, View, PropertySetter} from 'angular2/angular2';
import {NgElement, EventEmitter, PropertySetter} from 'angular2/angular2';
@Decorator({
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
@Directive({
selector: '[ion-refresher]'
})
export class Refresher {

View File

@ -1,10 +1,13 @@
import {Component, View, bootstrap} from 'angular2/angular2';
import {bootstrap} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
import {Content} from 'ionic/components/content/content';
import {List} from 'ionic/components/list/list';
import {SearchBar} from 'ionic/components/search-bar/search-bar';
@Component({ selector: '[ion-app]' })
@Component({ selector: 'ion-app' })
@View({
templateUrl: 'main.html',
directives: [Content, List, SearchBar]
@ -15,4 +18,7 @@ class IonicApp {
}
}
bootstrap(IonicApp)
export function main() {
bootstrap(IonicApp);
}

View File

@ -1,8 +1,11 @@
import {Component, View, bootstrap} from 'angular2/angular2'
import {bootstrap} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
import {FormBuilder, Validators, FormDirectives, ControlGroup} from 'angular2/forms';
import {IONIC_DIRECTIVES} from 'ionic/ionic'
@Component({ selector: '[ion-app]' })
@Component({ selector: 'ion-app' })
@View({
templateUrl: 'main.html',
directives: [FormDirectives].concat(IONIC_DIRECTIVES)
@ -22,4 +25,7 @@ class IonicApp {
}
}
bootstrap(IonicApp)
export function main() {
bootstrap(IonicApp);
}

View File

@ -1,4 +1,7 @@
import {NgElement, Renderer, ElementRef, Component, DefaultValueAccessor, View, Ancestor, Optional, Decorator, Directive} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
import {NgElement, Renderer, ElementRef, DefaultValueAccessor, Ancestor, Optional} from 'angular2/angular2'
import {ControlGroup, ControlDirective} from 'angular2/forms'
import {dom} from 'ionic/util';
import {IonicComponent} from 'ionic/config/component'

View File

@ -1,8 +1,11 @@
import {Component, View, bootstrap} from 'angular2/angular2'
import {bootstrap} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
import {FormBuilder, Validators, FormDirectives, ControlGroup} from 'angular2/forms';
import {IONIC_DIRECTIVES} from 'ionic/ionic'
@Component({ selector: '[ion-app]' })
@Component({ selector: 'ion-app' })
@View({
templateUrl: 'main.html',
directives: [FormDirectives].concat(IONIC_DIRECTIVES)
@ -24,4 +27,7 @@ class IonicApp {
}
}
bootstrap(IonicApp)
export function main() {
bootstrap(IonicApp);
}

View File

@ -0,0 +1,24 @@
import {bootstrap} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
import {Nav} from 'ionic/ionic'
import {SignInPage} from './pages/sign-in'
@Component({
selector: 'ion-app',
})
@View({
templateUrl: 'main.html',
directives: [Nav]
})
class IonicApp {
constructor() {
this.initial = SignInPage
}
}
export function main() {
bootstrap(IonicApp);
}

View File

@ -1,18 +0,0 @@
import {Component, View, bootstrap} from 'angular2/angular2'
import {Nav} from 'ionic/ionic'
import {SignInPage} from 'pages/sign-in'
@Component({
selector: '[ion-app]',
})
@View({
templateUrl: 'main.html',
directives: [Nav]
})
class App {
constructor() {
this.initial = SignInPage
}
}
bootstrap(App)

View File

@ -10,11 +10,11 @@ import {
Toolbar,
ToolbarTitle,
} from 'ionic/ionic';
import {TabsPage} from 'pages/tabs';
import {TabsPage} from './tabs';
@Component()
@View({
templateUrl: 'pages/sign-in.html',
templateUrl: './pages/sign-in.html',
directives: [Content, Toolbar, ToolbarTitle]
})
export class SignInPage {

View File

@ -16,7 +16,7 @@ import {Toolbar, ToolbarTitle} from 'ionic/components/toolbar/toolbar';
selector: 'tabs-page'
})
@View({
templateUrl: 'pages/tabs.html',
templateUrl: './pages/tabs.html',
directives: [Tabs, Tab, Content]
})

View File

@ -1,10 +1,13 @@
import {Component, View, bootstrap} from 'angular2/angular2'
import {bootstrap} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
import {Tabs, Tab} from 'ionic/ionic'
import {Engine} from 'ionic/engine/engine'
import * as util from 'ionic/util'
@Component({ selector: '[ion-app]' })
@Component({ selector: 'ion-app' })
@View({
templateUrl: 'main.html',
directives: [Tabs, Tab]
@ -30,4 +33,7 @@ class IonicApp {
}
}
bootstrap(IonicApp);
export function main() {
bootstrap(IonicApp);
}

View File

@ -0,0 +1,22 @@
import {bootstrap} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
import {Tabs, Tab} from 'ionic/ionic';
@Component({ selector: 'ion-app' })
@View({
templateUrl: 'main.html',
directives: [Tabs, Tab]
})
class IonicApp {
constructor() {
console.log('IonicApp Start')
}
}
export function main() {
bootstrap(IonicApp);
}

View File

@ -1,16 +0,0 @@
import {Component, View, bootstrap} from 'angular2/angular2';
import {Tabs, Tab} from 'ionic/ionic';
@Component({ selector: '[ion-app]' })
@View({
templateUrl: 'main.html',
directives: [Tabs, Tab]
})
class IonicApp {
constructor() {
console.log('IonicApp Start')
}
}
bootstrap(IonicApp)

View File

@ -0,0 +1,19 @@
import {bootstrap} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
@Component({ selector: 'ion-app' })
@View({
templateUrl: 'main.html'
})
class IonicApp {
constructor() {
console.log('IonicApp Start')
}
}
export function main() {
bootstrap(IonicApp);
}

View File

@ -1,14 +0,0 @@
import {Component, View, bootstrap} from 'angular2/angular2';
@Component({ selector: '[ion-app]' })
@View({
templateUrl: 'main.html'
})
class IonicApp {
constructor() {
console.log('IonicApp Start')
}
}
bootstrap(IonicApp)

View File

@ -0,0 +1,22 @@
import {bootstrap} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
import {Tabs, Tab} from 'ionic/ionic';
@Component({ selector: 'ion-app' })
@View({
templateUrl: 'main.html',
directives: [Tabs, Tab]
})
class IonicApp {
constructor() {
console.log('IonicApp Start')
}
}
export function main() {
bootstrap(IonicApp);
}

View File

@ -1,16 +0,0 @@
import {Component, View, bootstrap} from 'angular2/angular2';
import {Tabs, Tab} from 'ionic/ionic';
@Component({ selector: '[ion-app]' })
@View({
templateUrl: 'main.html',
directives: [Tabs, Tab]
})
class IonicApp {
constructor() {
console.log('IonicApp Start')
}
}
bootstrap(IonicApp)

View File

@ -0,0 +1,20 @@
import {bootstrap} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
@Component({ selector: 'ion-app' })
@View({
templateUrl: 'main.html',
directives: []
})
class IonicApp {
constructor() {
console.log('IonicApp Start')
}
}
export function main() {
bootstrap(IonicApp);
}

View File

@ -1,15 +0,0 @@
import {Component, View, bootstrap} from 'angular2/angular2';
@Component({ selector: '[ion-app]' })
@View({
templateUrl: 'main.html',
directives: []
})
class IonicApp {
constructor() {
console.log('IonicApp Start')
}
}
bootstrap(IonicApp)

View File

@ -0,0 +1,20 @@
import {bootstrap} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
@Component({ selector: 'ion-app' })
@View({
templateUrl: 'main.html',
directives: []
})
class IonicApp {
constructor() {
console.log('IonicApp Start')
}
}
export function main() {
bootstrap(IonicApp);
}

View File

@ -1,15 +0,0 @@
import {Component, View, bootstrap} from 'angular2/angular2';
@Component({ selector: '[ion-app]' })
@View({
templateUrl: 'main.html',
directives: []
})
class IonicApp {
constructor() {
console.log('IonicApp Start')
}
}
bootstrap(IonicApp)

View File

@ -0,0 +1,20 @@
import {bootstrap} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
@Component({ selector: 'ion-app' })
@View({
templateUrl: 'main.html',
directives: []
})
class IonicApp {
constructor() {
console.log('IonicApp Start')
}
}
export function main() {
bootstrap(IonicApp);
}

View File

@ -1,15 +0,0 @@
import {Component, View, bootstrap} from 'angular2/angular2';
@Component({ selector: '[ion-app]' })
@View({
templateUrl: 'main.html',
directives: []
})
class IonicApp {
constructor() {
console.log('IonicApp Start')
}
}
bootstrap(IonicApp)

View File

@ -17,6 +17,7 @@
"gulp-sass": "^1.3.3",
"gulp-shell": "^0.4.0",
"gulp-traceur": "^0.17.1",
"gulp-watch": "^4.2.4",
"gulp-wrap": "^0.11.0",
"karma": "^0.12.31",
"karma-chrome-launcher": "^0.1.7",

View File

@ -4,25 +4,13 @@
<meta charset="UTF-8" />
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no" />
</head>
<body>
<ion-app>
Loading...
</ion-app>
$SCRIPTS$
</body>
<script src="traceur-runtime.js"></script>
<script src="es6-module-loader-sans-promises.src.js"></script>
<script src="zone.js"></script>
<script src="long-stack-trace-zone.js"></script>
<script src="system.src.js"></script>
<script src="extension-register.js"></script>
<script src="extension-cjs.js"></script>
<script src="Reflect.js"></script>
<script src="runtime_paths.js"></script>
<script>
System.import('examples/src/ionic/nav/basic/main').catch(console.error.bind(console));
</script>
</html>