Skip to content

Commit

Permalink
feat(image-loader): add preload method
Browse files Browse the repository at this point in the history
closes #16
  • Loading branch information
ihadeed committed Feb 7, 2017
1 parent 365b1d5 commit a83f143
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/providers/image-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ export class ImageLoader {
}
}

/**
* Preload an image
* @param imageUrl {string} Image URL
* @returns {Promise<string>} returns a promise that resolves with the cached image URL
*/
preload(imageUrl: string): Promise<string> {
return this.getImagePath(imageUrl);
}

/**
* Clears the cache
*/
Expand Down

0 comments on commit a83f143

Please sign in to comment.