Cache Image for Offline Use

Thank you @rapropos ! Worked like a charm!
I’m going to read more about DOMSanitizer to avoid such questions in the future :slight_smile:

It’s not necessarily specific to DOMSanitizer, although that’s where most people seem to bang into it in real life.

If bar is a string, the following two expressions are functionally identical:

foo="{{bar}}"
[foo]="bar"

If it’s not a string, you must use the second syntax. Rather than remembering this all the time, that’s why I recommend just never using the first syntax. When working with DOMSanitizer, you are creating a magical SafeUrl object. The {{}} syntax causes it to lose its magic and become an ordinary string again.

3 Likes

SharedModule contains code that will be used across your app and Feature Modules. You’ll import this SharedModule into the specific Feature Modules as needed. You DO NOT import the SharedModule into your main AppModule.

Creating a ‘SharedModule’ is part of the Angular Style Guide: Style 04-10.

More details on my post “Creating a shared module for Ionic App”