mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
App annotation/mode attribute
This commit is contained in:
@ -1,25 +1,26 @@
|
||||
import {Component, View, ElementRef, onInit} from 'angular2/angular2';
|
||||
import {Component, View, ElementRef} from 'angular2/angular2';
|
||||
|
||||
import {Ion} from '../ion';
|
||||
import {IonicConfig} from '../../config/config';
|
||||
import {IonicComponent} from '../../config/annotations';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'ion-content',
|
||||
properties: [
|
||||
'parallax'
|
||||
],
|
||||
lifecycle: [onInit]
|
||||
]
|
||||
})
|
||||
@View({
|
||||
template: '<div class="scroll-content"><content></content></div>'
|
||||
})
|
||||
export class Content extends Ion {
|
||||
constructor(elementRef: ElementRef) {
|
||||
super(elementRef);
|
||||
constructor(elementRef: ElementRef, ionicConfig: IonicConfig) {
|
||||
super(elementRef, ionicConfig);
|
||||
}
|
||||
|
||||
onInit() {
|
||||
this.scrollElement = this.elementRef.nativeElement.children[0];
|
||||
onIonInit() {
|
||||
this.scrollElement = this.getNativeElement().children[0];
|
||||
}
|
||||
|
||||
addScrollEventListener(handler) {
|
||||
|
@ -6,7 +6,7 @@ $content-container-ios-background-color: #000 !default;
|
||||
$content-ios-background-color: #efeff4 !default;
|
||||
|
||||
|
||||
.nav-ios.show-pane {
|
||||
.nav[mode="ios"].show-pane {
|
||||
|
||||
.content-container {
|
||||
background-color: $content-container-ios-background-color;
|
||||
|
@ -1,21 +0,0 @@
|
||||
import {Component, Directive} from 'angular2/angular2';
|
||||
|
||||
import {IonicView} from 'ionic/ionic';
|
||||
|
||||
|
||||
@Component({ selector: 'ion-app' })
|
||||
@IonicView({
|
||||
templateUrl: 'main.html'
|
||||
})
|
||||
class IonicApp {
|
||||
constructor() {
|
||||
console.log('IonicApp Start')
|
||||
}
|
||||
doRefresh() {
|
||||
console.log('DOREFRESH')
|
||||
}
|
||||
}
|
||||
|
||||
export function main(ionicBootstrap) {
|
||||
ionicBootstrap(IonicApp);
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
<ion-view nav-title="Pull to refresh">
|
||||
<ion-toolbar><ion-title>Pull to Refresh</ion-title></ion-toolbar>
|
||||
|
||||
<ion-content>
|
||||
<ion-refresher (refresh)="doRefresh($event, amt)"></ion-refresher>
|
||||
|
||||
<f></f>
|
||||
<f></f>
|
||||
<f></f>
|
||||
<f></f>
|
||||
<f></f>
|
||||
|
||||
</ion-content>
|
||||
|
||||
</ion-view>
|
||||
<style>
|
||||
f { display: block; height: 400px; width: 100%; background-color: #387ef5; margin-bottom: 15px; }
|
||||
#counter {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
padding: 20px;
|
||||
background-color: rgba(0,0,0,0.4);
|
||||
z-index: 5;
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user