Vue-router: 在路由参数后面设置 .html 就无法get params ?

Created on 23 May 2016  ·  2Comments  ·  Source: vuejs/vue-router

config:

router.map({
  '/': {
    name: 'home',
    component: (resolve) => require(['./Home'], resolve)
  },
  ...
  '/post/show/:id.html': {
    name: 'post-show',
    component: (resolve) => require(['./Post'], resolve)
  }
});

result

> this.$route.params
< { id.html: 1234.html }

So

How get get param id when access the eg '/post/show/123.html' ?

All 2 comments

Related with the #499 issue.

这个需求比较奇怪,需要修改路由匹配规则,并不打算支持。

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shinygang picture shinygang  ·  3Comments

druppy picture druppy  ·  3Comments

posva picture posva  ·  3Comments

kerlor picture kerlor  ·  3Comments

rr326 picture rr326  ·  3Comments