在不知道JavaScript的键的情况下Object,我怎么能像...
var obj = {
param1: 'something',
param2: 'somethingelse',
param3: 'another'
}
obj[param4] = 'yetanother';
Run Code Online (Sandbox Code Playgroud)
... INTO ...
var str = 'param1=something¶m2=somethingelse¶m3=another¶m4=yetanother';
Run Code Online (Sandbox Code Playgroud)
...?
$ resource非常棒,提供了处理Web服务的非常方便的方法.如果必须在不同的URL上执行GET和POST,该怎么办?
例如,GET URL是,http://localhost/pleaseGethere/:id
而POST URL http://localhost/pleasePosthere没有任何参数
我想禁用网址编码.
当我在下面使用这个.
this.router.navigate(['/profile', { tags: 'one,two' }]);
Run Code Online (Sandbox Code Playgroud)
网址是这样的
http://localhost:4200/profile;tags=one%2Ctwo
Run Code Online (Sandbox Code Playgroud)
我希望它非常像下面
http://localhost:4200/profile;tags=one,two
Run Code Online (Sandbox Code Playgroud)
有没有办法禁用网址编码?