mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-21 04:53:58 +08:00
chore(build): rename ionic directory to src and update all references in the build process.
This commit is contained in:
46
src/components/infinite-scroll/infinite-scroll-content.ts
Normal file
46
src/components/infinite-scroll/infinite-scroll-content.ts
Normal file
@ -0,0 +1,46 @@
|
||||
import {Component, Input, ViewEncapsulation} from '@angular/core';
|
||||
|
||||
import {Config} from '../../config/config';
|
||||
import {InfiniteScroll} from './infinite-scroll';
|
||||
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
@Component({
|
||||
selector: 'ion-infinite-scroll-content',
|
||||
template:
|
||||
'<div class="infinite-loading">' +
|
||||
'<div class="infinite-loading-spinner" *ngIf="loadingSpinner">' +
|
||||
'<ion-spinner [name]="loadingSpinner"></ion-spinner>' +
|
||||
'</div>' +
|
||||
'<div class="infinite-loading-text" [innerHTML]="loadingText" *ngIf="loadingText"></div>' +
|
||||
'</div>',
|
||||
host: {
|
||||
'[attr.state]': 'inf.state'
|
||||
},
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
})
|
||||
export class InfiniteScrollContent {
|
||||
|
||||
/**
|
||||
* @input {string} An animated SVG spinner that shows while loading.
|
||||
*/
|
||||
@Input() loadingSpinner: string;
|
||||
|
||||
/**
|
||||
* @input {string} Optional text to display while loading.
|
||||
*/
|
||||
@Input() loadingText: string;
|
||||
|
||||
constructor(private inf: InfiniteScroll, private _config: Config) {}
|
||||
|
||||
/**
|
||||
* @private
|
||||
*/
|
||||
ngOnInit() {
|
||||
if (!this.loadingSpinner) {
|
||||
this.loadingSpinner = this._config.get('infiniteLoadingSpinner', this._config.get('spinner', 'ios'));
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user