官术网_书友最值得收藏!

Vue Router

Vue Router allows you to map different states of your SPA to different URLs, giving you virtual pages. For example,mydomain.com/might be the front page of a blog and have a component hierarchy like this:

<p id="app">
  <my-header></my-header>
  <blog-summaries></blog-summaries>
  <my-footer></my-footer>
</p>

Whereasmydomain.com/post/1might be an inpidual post from the blog and look like this:

<p id="app">
  <my-header></my-header>
  <blog-post post-id="id">
  <my-footer></my-footer>
</p>

Changing from one page to the other doesn't require areloadof the page, just swapping the middle component to reflect the state of the URL, which is exactly what Vue Router does.

主站蜘蛛池模板: 广饶县| 彰化市| 汉阴县| 西乌珠穆沁旗| 昌乐县| 原阳县| 丹阳市| 江油市| 长泰县| 鄂托克前旗| 马关县| 徐汇区| 南阳市| 伊通| 秭归县| 房山区| 浙江省| 韩城市| 锡林浩特市| 韩城市| 扎囊县| 客服| 邳州市| 兰考县| 西畴县| 自贡市| 锡林浩特市| 江山市| 恩施市| 钟祥市| 太湖县| 浙江省| 紫云| 宝坻区| 简阳市| 台前县| 东丰县| 老河口市| 沁源县| 咸阳市| 金山区|