Closed OS-Chris closed 9 years ago
Makes sense. This should be a really simple change. I'll add an option (attribute) to disable typecasting.
I'm working on a branch that will add typecast="auto|string"
as an option on the router. It would look something like this.
<app-router typecast="string">
<!-- customerId will be bound as "123" instead of the number 123 -->
<app-route path="/customer/:customerId" import="/pages/customer-page.html"></app-route>
</app-router>
This would also leave strings alone and not unescape them.
I'm hoping to get one more set of changes in this weekend before bumping the version to 2.3.0.
I kept at it and got my other changes done. I bumped the version to 2.3.0 with this change and documented the typecast
attribute here https://erikringsmuth.github.io/app-router/#/api#typecast.
Legend. Thanks.
I'm having dramas with path paramaters being automatically type casted.
In some instances, I'd prefer to know that I'm getting a string. If there was an option to disable the auto type casting, that'd be awesome.