Skip to content

Commit

Permalink
feat(img-loader): allow adding content inside the image box
Browse files Browse the repository at this point in the history
  • Loading branch information
ihadeed committed Sep 2, 2017
1 parent 8f4c7d2 commit 366d42e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/img-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { ImageLoaderConfig } from '../providers/image-loader-config';

@Component({
selector: 'img-loader',
template: '<ion-spinner *ngIf="spinner && isLoading && !fallbackAsPlaceholder" [name]="spinnerName" [color]="spinnerColor"></ion-spinner>',
template: '<ion-spinner *ngIf="spinner && isLoading && !fallbackAsPlaceholder" [name]="spinnerName" [color]="spinnerColor"></ion-spinner>' +
'<ng-content></ng-content>',
styles: ['ion-spinner { float: none; margin-left: auto; margin-right: auto; display: block; }']
})
export class ImgLoader implements OnInit {
Expand Down Expand Up @@ -178,7 +179,7 @@ export class ImgLoader implements OnInit {
this.isLoading = !stopLoading;

if (this._useImg) {

// Using <img> tag
if (!this.element) {
// create img element if we dont have one
Expand Down

0 comments on commit 366d42e

Please sign in to comment.