mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
Merge branch 'alpha22'
This commit is contained in:
32
README.md
32
README.md
@@ -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
|
||||
|
||||
236
gulpfile.js
236
gulpfile.js
@@ -1,66 +1,86 @@
|
||||
var _ = require('lodash');
|
||||
var buildConfig = require('./scripts/build/config');
|
||||
var SystemJsBuilder = require('systemjs-builder');
|
||||
var exec = require('child_process').exec;
|
||||
var fs = require('fs');
|
||||
var gulp = require('gulp');
|
||||
var karma = require('karma').server;
|
||||
var path = require('path');
|
||||
var VinylFile = require('vinyl');
|
||||
|
||||
var argv = require('yargs').argv;
|
||||
var babel = require('gulp-babel');
|
||||
var cached = require('gulp-cached');
|
||||
var concat = require('gulp-concat');
|
||||
var debug = require('gulp-debug');
|
||||
var del = require('del');
|
||||
var gulpif = require('gulp-if');
|
||||
var karma = require('karma').server;
|
||||
var plumber = require('gulp-plumber');
|
||||
var rename = require('gulp-rename');
|
||||
var sass = require('gulp-sass');
|
||||
var shell = require('gulp-shell');
|
||||
var through2 = require('through2');
|
||||
var traceur = require('gulp-traceur');
|
||||
var runSequence = require('run-sequence');
|
||||
var watch = require('gulp-watch');
|
||||
|
||||
|
||||
require('./scripts/snapshot/snapshot.task')(gulp, argv, buildConfig);
|
||||
// !!! TEMP HACK !!!
|
||||
// first run ./update-angular.sh
|
||||
gulp.task('watch', function() {
|
||||
|
||||
runSequence(
|
||||
'clean',
|
||||
'ionic.copy.js',
|
||||
'ionic.examples',
|
||||
'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('default', ['clean'], function() {
|
||||
gulp.run('build');
|
||||
});
|
||||
|
||||
gulp.task('build', ['e2e', 'ionic-js', 'ng2', 'sass']);
|
||||
|
||||
gulp.task('lib', ['fonts', 'dependencies']);
|
||||
|
||||
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('clean', function(done) {
|
||||
del(['../angular/modules/ionic, ./angular/modules/examples/src/ionic'], done);
|
||||
});
|
||||
|
||||
gulp.task('karma', function() {
|
||||
return karma.start({ configFile: __dirname + '/scripts/test/karma.conf.js' })
|
||||
|
||||
gulp.task('ionic.copy.js', function(done) {
|
||||
return gulp.src(['ionic/**/*.js', '!ionic/components/*/test/**/*'])
|
||||
.pipe(gulp.dest('../angular/modules/ionic'));
|
||||
});
|
||||
|
||||
gulp.task('karma-watch', function() {
|
||||
return karma.start({ configFile: __dirname + '/scripts/test/karma-watch.conf.js' })
|
||||
|
||||
gulp.task('ionic.examples', function() {
|
||||
var indexContents = _.template( fs.readFileSync('scripts/e2e/angular.template.html') )({
|
||||
buildConfig: buildConfig
|
||||
});
|
||||
|
||||
// Get each test folder with gulp.src
|
||||
return gulp.src('ionic/components/*/test/*/**/*')
|
||||
.pipe(rename(function(file) {
|
||||
file.dirname = file.dirname.replace(path.sep + 'test' + path.sep, path.sep)
|
||||
}))
|
||||
.pipe(gulpif(/index.js$/, processMain()))
|
||||
.pipe(gulp.dest('../angular/modules/examples/src/ionic'))
|
||||
|
||||
function processMain() {
|
||||
return through2.obj(function(file, enc, next) {
|
||||
var self = this;
|
||||
self.push(new VinylFile({
|
||||
base: file.base,
|
||||
contents: new Buffer(indexContents),
|
||||
path: path.join(path.dirname(file.path), 'index.html'),
|
||||
}));
|
||||
next(null, file);
|
||||
})
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
gulp.task('dependencies', function() {
|
||||
var copyFrom = buildConfig.scripts
|
||||
.map(function(data) { return data.from; })
|
||||
.filter(function(item) { return !!item; });
|
||||
return gulp.src(copyFrom)
|
||||
.pipe(gulp.dest(buildConfig.distLib))
|
||||
});
|
||||
|
||||
gulp.task('sass', function() {
|
||||
return gulp.src('ionic/ionic.scss')
|
||||
@@ -72,14 +92,76 @@ gulp.task('sass', function() {
|
||||
.pipe(gulp.dest('dist/css'));
|
||||
});
|
||||
|
||||
|
||||
gulp.task('update.angular', function(done) {
|
||||
|
||||
if (!fs.existsSync('../angular')) {
|
||||
fs.mkdirSync('../angular');
|
||||
|
||||
console.log('cloning angular master...');
|
||||
exec('git clone git@github.com:angular/angular ../angular', function() {
|
||||
npmInstall();
|
||||
});
|
||||
|
||||
} else {
|
||||
console.log('angular master: cleaning modules');
|
||||
del(['../angular/modules'], function() {
|
||||
|
||||
console.log('angular master: reset --hard...');
|
||||
exec('git reset --hard origin/master', {cwd: '../angular'}, function () {
|
||||
|
||||
console.log('angular master: git pull origin master...');
|
||||
exec('git pull origin master', function () {
|
||||
npmInstall();
|
||||
});
|
||||
});
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
function npmInstall() {
|
||||
console.log('angular master: npm install (may take a while, chill out)...');
|
||||
exec('npm install', {cwd: '../angular'}, function () {
|
||||
done();
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
require('./scripts/snapshot/snapshot.task')(gulp, argv, buildConfig);
|
||||
|
||||
|
||||
// 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' })
|
||||
});
|
||||
|
||||
gulp.task('karma-watch', function() {
|
||||
return karma.start({ configFile: __dirname + '/scripts/test/karma-watch.conf.js' })
|
||||
});
|
||||
|
||||
gulp.task('fonts', function() {
|
||||
return gulp.src('ionic/components/icon/fonts/**/*')
|
||||
.pipe(gulp.dest('dist/fonts'));
|
||||
});
|
||||
|
||||
gulp.task('clean', function(done) {
|
||||
del([buildConfig.dist], done);
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
gulp.task('e2e', ['ionic-js', 'sass'], function() {
|
||||
var indexContents = _.template( fs.readFileSync('scripts/e2e/index.template.html') )({
|
||||
@@ -100,8 +182,8 @@ gulp.task('e2e', ['ionic-js', 'sass'], function() {
|
||||
file.dirname = file.dirname.replace(path.sep + 'test' + path.sep, path.sep)
|
||||
}))
|
||||
.pipe(gulpif(/main.js$/, processMain()))
|
||||
.pipe(gulpif(/e2e.js$/, createPlatformTests()))
|
||||
.pipe(gulp.dest(buildConfig.dist + '/e2e'))
|
||||
//.pipe(gulpif(/e2e.js$/, createPlatformTests()))
|
||||
//.pipe(gulp.dest(buildConfig.dist + '/e2e'))
|
||||
|
||||
function processMain() {
|
||||
return through2.obj(function(file, enc, next) {
|
||||
@@ -112,37 +194,9 @@ gulp.task('e2e', ['ionic-js', 'sass'], function() {
|
||||
path: path.join(path.dirname(file.path), 'index.html'),
|
||||
}));
|
||||
next(null, file);
|
||||
|
||||
// var builder = new SystemJsBuilder({
|
||||
// baseURL: __dirname,
|
||||
// traceurOptions: { annotations: true, types: true },
|
||||
// meta: {
|
||||
// 'angular2/angular2': { build: false },
|
||||
// 'ionic/ionic': { build: false },
|
||||
// },
|
||||
// map: {
|
||||
// hammer: 'node_modules/hammerjs/hammer',
|
||||
// rx: 'node_modules/rx'
|
||||
// },
|
||||
// paths: {
|
||||
// 'angular2/*': 'dist/lib/angular2/*.js',
|
||||
// 'app/*': path.dirname(file.path) + '/*.js'
|
||||
// },
|
||||
// });
|
||||
// builder.build('app/main').then(function(output) {
|
||||
// self.push(new VinylFile({
|
||||
// base: file.base,
|
||||
// contents: new Buffer(output.source),
|
||||
// path: file.path,
|
||||
// }));
|
||||
// next();
|
||||
// })
|
||||
// .catch(function(err) {
|
||||
// console.log('error', err);
|
||||
// throw new Error(err);
|
||||
// });
|
||||
})
|
||||
}
|
||||
|
||||
function createPlatformTests(file) {
|
||||
return through2.obj(function(file, enc, next) {
|
||||
var self = this
|
||||
@@ -166,43 +220,3 @@ gulp.task('e2e', ['ionic-js', 'sass'], function() {
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
gulp.task('ng2-copy', function() {
|
||||
return gulp.src('node_modules/angular2/es6/prod/**/*.es6')
|
||||
.pipe(rename({ extname: '.js' }))
|
||||
.pipe(gulp.dest(path.join(buildConfig.distLib, 'angular2')));
|
||||
});
|
||||
|
||||
gulp.task('ng2', ['lib', 'ng2-copy'], function() {
|
||||
var builder = new SystemJsBuilder({
|
||||
paths: {
|
||||
"angular2/*": "node_modules/angular2/es6/prod/*.es6",
|
||||
"rx/*": "node_modules/angular2/node_modules/rx/*.js"
|
||||
}
|
||||
});
|
||||
return builder.build('angular2/angular2', path.join(buildConfig.distLib, 'angular2.js')).then(function() {
|
||||
return builder.build('angular2/di', path.join(buildConfig.distLib, 'angular2-di.js'));
|
||||
});
|
||||
});
|
||||
|
||||
gulp.task('ng2-di', ['ng2'], function() {
|
||||
});
|
||||
|
||||
gulp.task('ionic-js', function() {
|
||||
var builder = new SystemJsBuilder({
|
||||
traceurOptions: {
|
||||
annotations: true,
|
||||
types: true,
|
||||
},
|
||||
meta: {
|
||||
'angular2/angular2': { build: false },
|
||||
'angular2/di': { build: false },
|
||||
},
|
||||
paths: {
|
||||
"hammer": 'node_modules/hammerjs/*.js',
|
||||
"angular2/*": "node_modules/angular2/es6/prod/*.es6",
|
||||
"rx/*": "node_modules/angular2/node_modules/rx/*.js",
|
||||
}
|
||||
});
|
||||
return builder.build('ionic/ionic', path.join(buildConfig.distLib, 'ionic2.js'));
|
||||
});
|
||||
|
||||
21
ionic/components/action-menu/test/basic/index.js
Normal file
21
ionic/components/action-menu/test/basic/index.js
Normal 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);
|
||||
}
|
||||
@@ -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)
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
18
ionic/components/app/test/typography/index.js
Normal file
18
ionic/components/app/test/typography/index.js
Normal 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);
|
||||
}
|
||||
@@ -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)
|
||||
20
ionic/components/aside/test/basic/index.js
Normal file
20
ionic/components/aside/test/basic/index.js
Normal 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);
|
||||
}
|
||||
@@ -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);
|
||||
@@ -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']
|
||||
// })
|
||||
|
||||
19
ionic/components/button/test/basic/index.js
Normal file
19
ionic/components/button/test/basic/index.js
Normal 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);
|
||||
}
|
||||
@@ -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)
|
||||
18
ionic/components/button/test/block/index.js
Normal file
18
ionic/components/button/test/block/index.js
Normal 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);
|
||||
}
|
||||
@@ -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)
|
||||
18
ionic/components/button/test/clear/index.js
Normal file
18
ionic/components/button/test/clear/index.js
Normal 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);
|
||||
}
|
||||
@@ -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)
|
||||
18
ionic/components/button/test/full/index.js
Normal file
18
ionic/components/button/test/full/index.js
Normal 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);
|
||||
}
|
||||
@@ -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)
|
||||
18
ionic/components/button/test/icons/index.js
Normal file
18
ionic/components/button/test/icons/index.js
Normal 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);
|
||||
}
|
||||
@@ -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)
|
||||
18
ionic/components/button/test/outline/index.js
Normal file
18
ionic/components/button/test/outline/index.js
Normal 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);
|
||||
}
|
||||
@@ -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)
|
||||
18
ionic/components/button/test/sizes/index.js
Normal file
18
ionic/components/button/test/sizes/index.js
Normal 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);
|
||||
}
|
||||
@@ -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)
|
||||
23
ionic/components/card/test/basic/index.js
Normal file
23
ionic/components/card/test/basic/index.js
Normal 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);
|
||||
}
|
||||
@@ -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)
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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',
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
// form
|
||||
|
||||
@@ -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, {
|
||||
// })
|
||||
|
||||
@@ -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, {
|
||||
// })
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
23
ionic/components/layout/test/basic/index.js
Normal file
23
ionic/components/layout/test/basic/index.js
Normal 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);
|
||||
}
|
||||
@@ -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)
|
||||
@@ -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']
|
||||
// })
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
22
ionic/components/nav/test/basic/index.js
Normal file
22
ionic/components/nav/test/basic/index.js
Normal 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 {Nav} from 'ionic/components/nav/nav'
|
||||
import {Log} from 'ionic/util'
|
||||
import {FirstPage} from './pages/first-page'
|
||||
|
||||
|
||||
@Component({ selector: 'ion-app' })
|
||||
@View({
|
||||
templateUrl: 'main.html'
|
||||
})
|
||||
class IonicApp {
|
||||
constructor() {
|
||||
console.log('IonicApp Start');
|
||||
}
|
||||
}
|
||||
|
||||
export function main() {
|
||||
bootstrap(IonicApp);
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
import {Component, View, bootstrap} from 'angular2/angular2'
|
||||
import {Nav} from 'ionic/components/nav/nav'
|
||||
import {Log} from 'ionic/util'
|
||||
import {FirstPage} from 'pages/first-page'
|
||||
|
||||
@Component({ selector: '[ion-app]' })
|
||||
@View({
|
||||
directives: [Nav],
|
||||
templateUrl: 'main.html'
|
||||
})
|
||||
class IonicApp {
|
||||
constructor() {
|
||||
this.initial = FirstPage
|
||||
console.log('IonicApp Start');
|
||||
}
|
||||
}
|
||||
|
||||
bootstrap(IonicApp);
|
||||
@@ -1,6 +1,6 @@
|
||||
import {Component, View, Parent} from 'angular2/angular2'
|
||||
import {NavController, Toolbar, Content} from 'ionic/ionic'
|
||||
import {SecondPage} from 'pages/second-page'
|
||||
import {SecondPage} from './second-page'
|
||||
|
||||
|
||||
@Component()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {Component, View, Parent} from 'angular2/angular2'
|
||||
import {NavController, Toolbar, Content} from 'ionic/ionic'
|
||||
import {ThirdPage} from 'pages/third-page'
|
||||
import {ThirdPage} from './third-page'
|
||||
|
||||
|
||||
@Component()
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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'
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
24
ionic/components/tabs/test/advanced/index.js
Normal file
24
ionic/components/tabs/test/advanced/index.js
Normal 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);
|
||||
}
|
||||
@@ -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)
|
||||
@@ -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 {
|
||||
|
||||
@@ -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]
|
||||
})
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
22
ionic/components/tabs/test/tab-bar-bottom/index.js
Normal file
22
ionic/components/tabs/test/tab-bar-bottom/index.js
Normal 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);
|
||||
}
|
||||
@@ -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)
|
||||
19
ionic/components/tabs/test/tab-bar-icons/index.js
Normal file
19
ionic/components/tabs/test/tab-bar-icons/index.js
Normal 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);
|
||||
}
|
||||
@@ -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)
|
||||
22
ionic/components/tabs/test/tab-bar-top/index.js
Normal file
22
ionic/components/tabs/test/tab-bar-top/index.js
Normal 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);
|
||||
}
|
||||
@@ -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)
|
||||
20
ionic/components/toolbar/test/html-title/index.js
Normal file
20
ionic/components/toolbar/test/html-title/index.js
Normal 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);
|
||||
}
|
||||
@@ -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)
|
||||
20
ionic/components/toolbar/test/long-title/index.js
Normal file
20
ionic/components/toolbar/test/long-title/index.js
Normal 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);
|
||||
}
|
||||
@@ -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)
|
||||
20
ionic/components/toolbar/test/lopsided-buttons/index.js
Normal file
20
ionic/components/toolbar/test/lopsided-buttons/index.js
Normal 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);
|
||||
}
|
||||
@@ -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)
|
||||
@@ -1,6 +1,6 @@
|
||||
import {Gesture} from 'ionic/gestures/gesture';
|
||||
import * as util from 'ionic/util';
|
||||
import Hammer from 'hammer';
|
||||
//import Hammer from 'hammer';
|
||||
|
||||
/*
|
||||
* BUG(ajoslin): HammerJS 2.x does not have an alternative to HammerJS 1.x's
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as util from 'ionic/util';
|
||||
import Hammer from 'hammer';
|
||||
//import Hammer from 'hammer';
|
||||
|
||||
export class Gesture {
|
||||
constructor(element, opts = {}) {
|
||||
|
||||
@@ -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",
|
||||
|
||||
16
scripts/e2e/angular.template.html
Normal file
16
scripts/e2e/angular.template.html
Normal file
@@ -0,0 +1,16 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<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>
|
||||
</html>
|
||||
@@ -1 +0,0 @@
|
||||
// register(System);
|
||||
Reference in New Issue
Block a user