Skip to content

Commit a12a61c

Browse files
eduardoRothihadeed
authored andcommitted
chore(): Added quirks section (#173)
Added quirks section with information about `@ionic-native/file` or `cordova-plugin-file` problem and workaround
1 parent 3ce31c0 commit a12a61c

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,19 @@ The `<img-loader>` component takes many attributes that allows you to customize
114114
115115
**Note:** The default values can be changed using the [global configuration](https://github.com/zyramedia/ionic-image-loader#global-configuration) feature.
116116
117+
## Quirks
118+
In some cases, images won't load on the first time, the culprit seems to be `@ionic-native/file` or `cordova-plugin-file` in its `writeFile` function not calling resolve or reject.
119+
120+
In the meantime we find a solution, here's a quick workaround:
121+
122+
In **./src/index.html** move your `polyfill.js`include above `cordova.js`
123+
```
124+
<!-- The polyfills js is generated during the build process -->
125+
<script src="build/polyfills.js"></script>
126+
127+
<!-- cordova.js required for cordova apps (remove if not needed) -->
128+
<script src="cordova.js"></script>
129+
```
117130
118131
# Global Configuration
119132
This is optional but it is helpful if you wish to set the global configuration for all of your `<img-loader>` instances. To configure the module, inject the `ImageLoaderConfig` provider in your app's main component.

0 commit comments

Comments
 (0)