Closed thunderkid closed 8 years ago
You are not specifying that the route begins with /
, #/why/max/88
fails but #why/max/88
does not.
Perhaps I'm misunderstanding you. With the above router, setting the browser url to
http://localhost:8161/#/why/max/44
gives req.params.maxNum="/why"
And setting the url to
http://localhost:8161/#why/max/44
gives req.params.maxNum="why"
which is still not what I'd expect.
I'm matching with
router.get('*/max/:maxNum', function(req) { console.log(
max is ${req.params.maxNum}); });
When I set the url to:
...#/why/max/88
I get
req.params = { 1: "88", maxNum: "why" }
That seems wrong. I should be getting just
{ maxNum: "88" }