Angular: Dynamically inserting SVG into an element
How to store and deliver SVG data from a database dynamically through Angular.
I recently launched a single-page web app for a digital illustrator. The app was pretty standard, but they asked a unique request. The author did not want me to create renditions of their work in BPM, PNG, or JPEG formats. Instead, they wanted me to store and deliver SVG data from a database dynamically. Think, Base64 images but for vector-based artwork.
On the database side, it's nothing to complex. I chose Firebase as my real-time backend, but the rest of this entry will show you a few different ways on how to render SVG using Angular.