Angular 2 Route Param automatically converting to lowercase on localhost but remains capitalized on server

余生颓废 提交于 2020-01-07 05:48:05

问题


I currently have a .NET angular 2 program, with a route styled as

<ControllerName>/:id

Run on localhost with IIS Express, the id route param automatically converts to lowercase in the URL without me expressly doing any extra formatting. When calling the same controller and using matrix notation to input ID, however, it loses it's ability to automatically become lowercase

<ControllerName>;id=<CAPSGUID>

Curious thing is, when I host this on an IIS server, this functionality is somehow lost and the id route param remains upper case either way. Does anyone have any experience as to why this might happen? I've been having a hard time trying to properly word the question to get any related information.


回答1:


I couldn't find out the reason this was happening, and through the course of my testing the functionality disappeared. I ended up using a custom url serializer implementing DefaultUrlSerializer and adding conditions in which to automatically lowercase my GUID component. Hope this helps somebody.



来源:https://stackoverflow.com/questions/46231591/angular-2-route-param-automatically-converting-to-lowercase-on-localhost-but-rem

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!