chore(components): ngmodule updates

This commit is contained in:
Adam Bradley
2016-09-13 17:07:33 -05:00
parent 16df3a4aab
commit 52ada1ca6d
50 changed files with 927 additions and 790 deletions

View File

@ -1,9 +1,7 @@
import { Component, Input, ViewEncapsulation } from '@angular/core';
import { NgIf } from '@angular/common';
import { Config } from '../../config/config';
import { InfiniteScroll } from './infinite-scroll';
import { Spinner } from '../spinner/spinner';
/**
@ -18,7 +16,6 @@ import { Spinner } from '../spinner/spinner';
'</div>' +
'<div class="infinite-loading-text" [innerHTML]="loadingText" *ngIf="loadingText"></div>' +
'</div>',
directives: [NgIf, Spinner],
host: {
'[attr.state]': 'inf.state'
},
@ -36,7 +33,7 @@ export class InfiniteScrollContent {
*/
@Input() loadingText: string;
constructor(private inf: InfiniteScroll, private _config: Config) {}
constructor(public inf: InfiniteScroll, private _config: Config) {}
/**
* @private

View File

@ -95,13 +95,13 @@ import { Content } from '../content/content';
selector: 'ion-infinite-scroll'
})
export class InfiniteScroll {
private _lastCheck: number = 0;
private _highestY: number = 0;
private _scLsn: Function;
private _thr: string = '15%';
private _thrPx: number = 0;
private _thrPc: number = 0.15;
private _init: boolean = false;
_lastCheck: number = 0;
_highestY: number = 0;
_scLsn: Function;
_thr: string = '15%';
_thrPx: number = 0;
_thrPc: number = 0.15;
_init: boolean = false;
state: string = STATE_ENABLED;
@ -144,10 +144,10 @@ export class InfiniteScroll {
private _zone: NgZone,
private _elementRef: ElementRef
) {
_content.addCssClass('has-infinite-scroll');
_content.setElementClass('has-infinite-scroll', true);
}
private _onScroll() {
_onScroll() {
if (this.state === STATE_LOADING || this.state === STATE_DISABLED) {
return 1;
}
@ -217,7 +217,7 @@ export class InfiniteScroll {
this._setListeners(shouldEnable);
}
private _setListeners(shouldListen: boolean) {
_setListeners(shouldListen: boolean) {
if (this._init) {
if (shouldListen) {
if (!this._scLsn) {