我有一个相对简单的问题,但无法找到它的解决方案呢。我正在使用Ember并使用查询参数调用路由。代码如下。Ember QueryParams with“=”character
从“ember”导入Ember;
export default Ember.ObjectController.extend({
queryParams : ['user_id','custom_lis_person_name_given']
user_id : null,
custom_lis_person_name_given : null
});
所以现在可以说,我打电话我用下面的URL路径,
localhost:4200/index.html#/route1?user_id=123456&custom_lis_person_name_given=hello
现在查询参数的值是
user_id = 123456
custom_lis_person_name_given = hello
,如果我现在我的网址更改为看起来像
localhost:4200/index.html#/route1?user_id=12345=6&custom_lis_person_name_given=hello
localhost:4200/index.html#/route1?user_id=123456=&custom_lis_person_name_given=hello
现在th e值的计算方式如下:
user_id = 12345 or user_id=123456
custom_lis_person_name_given = hello
所以基本上这个值在查询参数值中看到a = sign的地方结束。有没有解决方法?我需要的USER_ID = “12345 = 6”或“123456 =”
也许有在控制器或路线一些钩子可以做到这一点。我试过serializeQueryParam和deserializeQueryParam但它没有帮助。
由于提前
我有一个解决方法,在使用URL之前转义queryParamter。我只是**逃生('123456 =')**,它的工作。但在应用程序中,url在后端被创建。如果我可以在UI端完全修复它会更好 – aneeshere 2015-02-09 08:17:43