Published:
Angular URL Encoding
Reading time: 1min
Recently a project I was working on required the ability to URL-encode various
strings in order to create mailTo:
links on the fly. Because more than one of
our modules needed this ability, I decided to create a simple component to share
the code between modules.
This is dead simple thanks to JavaScript's encodeURI
and decodeURI
. Take a
look:
Feel free to grab it on GitHub or offer any improvements.