mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
App annotation/mode attribute
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
import {Component, View, ElementRef} from 'angular2/angular2';
|
||||
import {View, ElementRef} from 'angular2/angular2';
|
||||
|
||||
import {Ion} from '../ion';
|
||||
import {IonicConfig} from '../../config/config';
|
||||
import {IonicComponent} from '../../config/annotations';
|
||||
|
||||
|
||||
/**
|
||||
* ion-scroll is a non-flexboxed scroll area that can
|
||||
* scroll horizontally or vertically.
|
||||
*/
|
||||
@Component({
|
||||
@IonicComponent({
|
||||
selector: 'ion-scroll',
|
||||
properties: [
|
||||
'scrollX', 'scrollY'
|
||||
@@ -18,14 +20,14 @@ import {Ion} from '../ion';
|
||||
}
|
||||
})
|
||||
@View({
|
||||
template: `<div class="scroll-content"><content></content></div>`
|
||||
template: '<div class="scroll-content"><content></content></div>'
|
||||
})
|
||||
export class Scroll extends Ion {
|
||||
constructor(elementRef: ElementRef) {
|
||||
super(elementRef);
|
||||
constructor(elementRef: ElementRef, ionicConfig: IonicConfig) {
|
||||
super(elementRef, ionicConfig);
|
||||
|
||||
setTimeout(() => {
|
||||
this.scrollElement = elementRef.nativeElement.children[0];
|
||||
this.scrollElement = this.getNativeElement().children[0];
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,21 +1,11 @@
|
||||
import {Component} from 'angular2/angular2';
|
||||
|
||||
import {IonicView} from 'ionic/ionic';
|
||||
import {App} from 'ionic/ionic';
|
||||
|
||||
|
||||
@Component({ selector: 'ion-app' })
|
||||
@IonicView({
|
||||
@App({
|
||||
templateUrl: 'main.html'
|
||||
})
|
||||
class MyApp {
|
||||
constructor() {
|
||||
console.log('IonicApp Start')
|
||||
}
|
||||
doRefresh() {
|
||||
console.log('DOREFRESH')
|
||||
}
|
||||
}
|
||||
|
||||
export function main(ionicBootstrap) {
|
||||
ionicBootstrap(MyApp);
|
||||
}
|
||||
|
||||
@@ -1,16 +1,11 @@
|
||||
import {Component} from 'angular2/angular2';
|
||||
|
||||
import {IonicView} from 'ionic/ionic';
|
||||
import {App} from 'ionic/ionic';
|
||||
|
||||
|
||||
@Component({ selector: 'ion-app' })
|
||||
@IonicView({
|
||||
@App({
|
||||
templateUrl: 'main.html'
|
||||
})
|
||||
class MyApp {
|
||||
constructor() {
|
||||
console.log('IonicApp Start')
|
||||
}
|
||||
|
||||
doRefresh(refresher) {
|
||||
console.log('DOREFRESH', refresher)
|
||||
|
||||
@@ -18,14 +13,12 @@ class MyApp {
|
||||
refresher.complete();
|
||||
})
|
||||
}
|
||||
|
||||
doStarting() {
|
||||
console.log('DOSTARTING');
|
||||
}
|
||||
|
||||
doPulling(amt) {
|
||||
console.log('DOPULLING', amt);
|
||||
}
|
||||
}
|
||||
|
||||
export function main(ionicBootstrap) {
|
||||
ionicBootstrap(MyApp);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user