I have this code:
var search = $location.search();
if (angular.isDefined(search.load) && search.load != null) {
if (search.load = "confirmEmail")
authService.confirmEmailUserId = search.userId;
authService.confirmEmailCode = search.code;
$state.transitionTo("auth.content", {
content: search.load
});
}
It's in the app.run and it looks at the URL used to open the app.
But search.code was encoded with the C#
var callbackUrl = "http://localhost:2757/index.html" +
"?load=email" +
"&userId=" + user.Id +
"&code=" + HttpUtility.UrlEncode(code);
How can I get back the original value of code before it was passed to UrlEncode?