SVG to PNG fallback in AngularJS

Hi, my name is Tina! I am a Full Stack Software Developer and Tech Lead from Canada. ππ»ββοΈ
Search for a command to run...

Hi, my name is Tina! I am a Full Stack Software Developer and Tech Lead from Canada. ππ»ββοΈ
No comments yet. Be the first to comment.
Have you ever installed a package by using go install <some-package> and wondered how to uninstall it? Go is really great in that respect. Go packages are a single binary and theyβre installed based on how your Go tooling is set up. Provided we have ...

Overview This is the 3rd article in a series of posts about working with Open API to create generated API clients and documentation websites. In the 1st post we went over what we can do with Open API spec files, e.g. generate API clients and documen...

Overview This article is the 2nd in a series of blog posts that discuss using Open API to help with API documentation and API client code generation. In the previous article, we went over how we can generate documentation and API clients using existi...

Overview This article starts a series of Open API-related blog posts. OpenAPI, previously known as Swagger (a name still in use today for many of its tools), is a suite of tools that generate documentation and networking clients for various programmi...

You've probably already seen the scary alert (that's possibly why you're here), but in case you haven't, it looks something like this: NewAppIJustDownloaded pasted from your clipboard Sometimes it h

SVG images are great for crisp graphics on retina displays. They are a necessity in any responsive design website in this day and age but the file format is not supported in older browsers. You can get SVG to PNG fallback in AngularJS with this simple directive. To address dynamically loaded images in AngularJS we can use a directive. I developed a simple directive that works off of the image element whose only feature is to replace the SVG file extension with PNG in browsers that do not support SVG. Provided that you have a PNG with the same file name in the same location as the SVG file, this solution will work perfectly. The SVG to PNG fallback in AngularJS directive is available for download and install into your Angular apps using Bower or can be manually downloaded. Check out angular-svg-png on Github. 