Open aguerotSOVINTY opened 8 years ago
Hi guys,
Suppose I setup a route config as such: { path: '/item/:id', component: 'itemDetails', as: 'item' }
{ path: '/item/:id', component: 'itemDetails', as: 'item' }
and later on in my HTML I setup an nglink as such: <a ng-link="['/item', { id: item.id }]">Item details</a>
<a ng-link="['/item', { id: item.id }]">Item details</a>
Now if item.id = 'item#1' or 'itemwhatever?isusedasid' I get in troubles because the id parameter must be escaped in order to be processed correctly.
Is it possible to transform the id parameter value before it is resolved as a url? Shouldn't parameters escaped especially when using /:id route?
Thanks in advance for your input
Hi guys,
Suppose I setup a route config as such:
{ path: '/item/:id', component: 'itemDetails', as: 'item' }
and later on in my HTML I setup an nglink as such:
<a ng-link="['/item', { id: item.id }]">Item details</a>
Now if item.id = 'item#1' or 'itemwhatever?isusedasid' I get in troubles because the id parameter must be escaped in order to be processed correctly.
Is it possible to transform the id parameter value before it is resolved as a url? Shouldn't parameters escaped especially when using /:id route?
Thanks in advance for your input