App annotation/mode attribute

This commit is contained in:
Adam Bradley
2015-07-08 14:05:37 -05:00
parent 9d2570d2e5
commit 40fc77b0b6
112 changed files with 625 additions and 1466 deletions

View File

@ -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) {

View File

@ -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;

View File

@ -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);
}

View File

@ -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>