Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

AngularJS 1.x url case sensitivity

In case you didn’t know the routes that configured using UI-Router are case-sensitive.  Which is definitely not what I would expect. To get around this problem you can add a snippet of code to the _Layout.cshtml page (in the body tag).


script type=”text/javascript”>

(function () {

var base = document.querySelector(“base”);

var Normalized = RegExp(base.href, “i”).exec(location.href);

base.href = normalized ? normalized[0] : base.href;

}());

script>




This post first appeared on Random Technical Thoughts | Things I Want To Remem, please read the originial post: here

Share the post

AngularJS 1.x url case sensitivity

×

Subscribe to Random Technical Thoughts | Things I Want To Remem

Get updates delivered right to your inbox!

Thank you for your subscription

×