From a83f143082e1892f0daeaccfcf6123396a463401 Mon Sep 17 00:00:00 2001 From: Ibby Date: Tue, 7 Feb 2017 07:18:57 -0500 Subject: [PATCH] feat(image-loader): add preload method closes #16 --- src/providers/image-loader.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/providers/image-loader.ts b/src/providers/image-loader.ts index f216b6d..59f2f78 100644 --- a/src/providers/image-loader.ts +++ b/src/providers/image-loader.ts @@ -52,6 +52,15 @@ export class ImageLoader { } } + /** + * Preload an image + * @param imageUrl {string} Image URL + * @returns {Promise} returns a promise that resolves with the cached image URL + */ + preload(imageUrl: string): Promise { + return this.getImagePath(imageUrl); + } + /** * Clears the cache */