mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 11:41:20 +08:00
update angular again
This commit is contained in:
13
gulpfile.js
13
gulpfile.js
@ -75,7 +75,7 @@ gulp.task('clean', function(done) {
|
||||
del([buildConfig.dist], done)
|
||||
})
|
||||
|
||||
gulp.task('e2e', ['ionic-js', 'sass'], function() {
|
||||
gulp.task('e2e', ['ionic-js', 'sass', 'ng2-copy'], function() {
|
||||
var indexContents = _.template( fs.readFileSync('scripts/e2e/index.template.html') )({
|
||||
buildConfig: buildConfig
|
||||
});
|
||||
@ -118,9 +118,11 @@ gulp.task('e2e', ['ionic-js', 'sass'], function() {
|
||||
'ionic/ionic': { build: false },
|
||||
},
|
||||
map: {
|
||||
hammer: 'node_modules/hammerjs/hammer'
|
||||
hammer: 'node_modules/hammerjs/hammer',
|
||||
rx: 'node_modules/rx'
|
||||
},
|
||||
paths: {
|
||||
'angular2/*': 'dist/lib/angular2/*.js',
|
||||
'app/*': path.dirname(file.path) + '/*.js'
|
||||
},
|
||||
});
|
||||
@ -162,7 +164,12 @@ gulp.task('e2e', ['ionic-js', 'sass'], function() {
|
||||
|
||||
})
|
||||
|
||||
gulp.task('ng2', ['lib'], 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",
|
||||
|
@ -176,3 +176,5 @@ class IonicApp {
|
||||
}, 2000);
|
||||
}
|
||||
}
|
||||
|
||||
bootstrap(IonicApp);
|
||||
|
@ -10,7 +10,7 @@ import {IonicComponent} from 'ionic/config/component'
|
||||
|
||||
@Component({
|
||||
selector: 'ion-aside',
|
||||
bind: {
|
||||
properties: {
|
||||
content: 'content',
|
||||
side: 'side',
|
||||
dragThreshold: 'dragThreshold'
|
||||
@ -63,7 +63,7 @@ export class Aside {
|
||||
}
|
||||
|
||||
new IonicComponent(Aside, {
|
||||
bind: {
|
||||
properties: {
|
||||
side: {
|
||||
value: 'left'
|
||||
},
|
||||
|
@ -4,7 +4,7 @@ import {IonicComponent} from 'ionic/config/component'
|
||||
|
||||
@Component({
|
||||
selector: 'ion-checkbox',
|
||||
bind: {
|
||||
properties: {
|
||||
checked: 'checked'
|
||||
},
|
||||
events: {
|
||||
@ -66,7 +66,7 @@ export class Checkbox {
|
||||
}
|
||||
|
||||
new IonicComponent(Checkbox, {
|
||||
bind: {
|
||||
properties: {
|
||||
iconOff: {
|
||||
defaults: {
|
||||
ios: 'ion-ios-circle-outline',
|
||||
|
@ -3,22 +3,24 @@ import {
|
||||
Parent,
|
||||
NgElement,
|
||||
DynamicComponentLoader,
|
||||
DynamicComponentLocation,
|
||||
Optional
|
||||
ElementRef
|
||||
} from 'angular2/angular2'
|
||||
import {Optional} from 'angular2/src/di/annotations'
|
||||
import {NavViewport} from 'ionic/components/nav-viewport/nav-viewport'
|
||||
import {Tab} from 'ionic/components/tabs/tab'
|
||||
|
||||
console.log('names',DynamicComponent.name, Parent.name, NgElement.name, DynamicComponentLoader.name, ElementRef, Optional)
|
||||
|
||||
@DynamicComponent({
|
||||
selector: '.nav-pane',
|
||||
bind: {
|
||||
properties: {
|
||||
item: 'item'
|
||||
}
|
||||
})
|
||||
export class NavPane {
|
||||
constructor(
|
||||
loader: DynamicComponentLoader,
|
||||
location: DynamicComponentLocation,
|
||||
location: ElementRef,
|
||||
@NgElement() element: NgElement,
|
||||
|
||||
// FIXME: this is temporary until ng2 lets us inject tabs as a NavViewport
|
||||
@ -36,7 +38,7 @@ export class NavPane {
|
||||
this.initialized = true;
|
||||
this.Class = navItem.Class;
|
||||
|
||||
this._loader.load(navItem.Class, this._location).then(instance => {
|
||||
this._loader.loadIntoExistingLocation(navItem.Class, this._location).then(instance => {
|
||||
this.instance = instance
|
||||
navItem.finishSetup(this, instance)
|
||||
})
|
||||
|
@ -22,7 +22,7 @@ class NavStack {
|
||||
|
||||
@Component({
|
||||
selector: 'ion-nav-viewport',
|
||||
bind: {
|
||||
properties: {
|
||||
initial: 'initial'
|
||||
},
|
||||
services: [
|
||||
|
@ -4,7 +4,7 @@ import {IonicComponent} from 'ionic/config/component'
|
||||
|
||||
@Component({
|
||||
selector: 'ion-search-bar',
|
||||
bind: {
|
||||
properties: {
|
||||
cancelText: 'cancel-text',
|
||||
placeholderText: 'placeholder-text'
|
||||
}
|
||||
@ -25,7 +25,7 @@ export class SearchBar {
|
||||
}
|
||||
|
||||
new IonicComponent(SearchBar, {
|
||||
bind: {
|
||||
properties: {
|
||||
cancelText: {
|
||||
defaults: {
|
||||
ios: 'Cancel',
|
||||
|
@ -24,7 +24,7 @@ class SplitViewportDecorator {
|
||||
|
||||
@Component({
|
||||
selector: 'ion-split-view',
|
||||
bind: {
|
||||
properties: {
|
||||
defaultView: 'defaultView',
|
||||
navTitle: 'navTitle'
|
||||
},
|
||||
|
@ -4,7 +4,7 @@ import {IonicComponent} from 'ionic/config/component'
|
||||
|
||||
@Component({
|
||||
selector: 'ion-switch',
|
||||
bind: {
|
||||
properties: {
|
||||
checked: 'checked'
|
||||
},
|
||||
events: {
|
||||
|
@ -15,7 +15,7 @@ import {IonicComponent} from 'ionic/config/component'
|
||||
|
||||
@Component({
|
||||
selector: 'ion-tab',
|
||||
bind: {
|
||||
properties: {
|
||||
title: 'tab-title',
|
||||
icon: 'tab-icon',
|
||||
initial: 'initial'
|
||||
|
@ -3,7 +3,7 @@ import {IonicComponent} from 'ionic/config/component'
|
||||
|
||||
@Component({
|
||||
selector: 'ion-tabs',
|
||||
bind: {
|
||||
properties: {
|
||||
tabBarPlacement: 'tab-bar-placement',
|
||||
tabBarIcons: 'tab-bar-icons'
|
||||
}
|
||||
@ -74,7 +74,7 @@ export class Tabs {
|
||||
}
|
||||
|
||||
new IonicComponent(Tabs, {
|
||||
bind: {
|
||||
properties: {
|
||||
tabBarPlacement: {
|
||||
defaults: {
|
||||
ios: 'bottom',
|
||||
|
@ -25,7 +25,7 @@ export class BackButton {
|
||||
}
|
||||
|
||||
new IonicComponent(BackButton, {
|
||||
bind: {
|
||||
properties: {
|
||||
icon: {
|
||||
defaults: {
|
||||
ios: 'ion-ios-arrow-back',
|
||||
|
@ -1,12 +1,11 @@
|
||||
import {NgElement, Component, View as NgView, Ancestor} from 'angular2/angular2'
|
||||
import {Optional} from 'angular2/src/di/annotations'
|
||||
import {NgElement, Component, View as NgView, Ancestor, Optional} from 'angular2/angular2'
|
||||
import {BackButton} from 'ionic/components/toolbar/back-button'
|
||||
import {IonicComponent} from 'ionic/config/component'
|
||||
import {raf} from 'ionic/util/dom'
|
||||
|
||||
@Component({
|
||||
selector: 'ion-toolbar',
|
||||
bind: {
|
||||
properties: {
|
||||
title: 'nav-title'
|
||||
}
|
||||
})
|
||||
|
@ -5,7 +5,7 @@ import {IonicComponent} from 'ionic/config/component'
|
||||
|
||||
@Component({
|
||||
selector: 'ion-view',
|
||||
bind: {
|
||||
properties: {
|
||||
title: 'nav-title'
|
||||
}
|
||||
})
|
||||
|
@ -106,7 +106,7 @@ export class IonicComponent {
|
||||
/*
|
||||
@IonicComponent({
|
||||
selector: 'ion-back-button',
|
||||
bind: {
|
||||
properties: {
|
||||
icon: {
|
||||
ios: 'ion-back-ios',
|
||||
android: 'ion-back-android',
|
||||
|
@ -1,3 +1,11 @@
|
||||
import {NgElement} from 'angular2/angular2'
|
||||
Object.defineProperties(NgElement.prototype, {
|
||||
domElement: {
|
||||
get: function() {
|
||||
return this._view.render.delegate.boundElements[this._boundElementIndex];
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
export * from 'ionic/components'
|
||||
export * from 'ionic/platform/platform'
|
||||
|
Reference in New Issue
Block a user