javascript - AngularJS Parameter in redirectTo escaped "?" breaks route -


i redirect error page parameter. gets encoded /error%3ftype=404.
this breaks routing. route never active. typing or location works charm.

otherwise( {     redirectto: "/error?type=404" }); 

you shouldn't manipulate ? in url through routing. rather, can use $location service in manner:

$location.path('/error').search('type', 404) 

refer question more details: how pass "question mark" in url javascript


Comments

Popular posts from this blog

javascript - ScrollTo Effect (href to div) -

javascript - ng-class not responding to change in model in Angular? -

javascript - document.registerElement extending HTMLInputElement prototype while using custom tag name to avoid implicit browser style -