Thursday, April 23, 2015

Add / Get Query Value from Uri Extension Method

Needed to pull some code from an older project that had an interesting utility. It had extension methods for adding and retrieving values from a Uri query string.

 I thought that was neat so I wrote my own version.


Wednesday, April 15, 2015

Angular Html Literal Directive

Yes, this is not the way you're supposed to use Angular. There might be a better workaround out there.

I needed a way to generate image elements through Angular with custom attributes, including classes and styles. I'm working in a legacy system that makes this difficult. Can't use curly braces because we need to keep using the dead jQuery Tmpl, hasn't been phased out yet. I couldn't make the angular bindHtml directive to work. It kept on removing my style and class attributes.

So I came up with this...