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

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.

主站蜘蛛池模板: 芒康县| 青龙| 四子王旗| 麻阳| 五家渠市| 江阴市| 蒙山县| 富裕县| 山东省| 西盟| 诸暨市| 黄浦区| 成安县| 永胜县| 长子县| 冷水江市| 海林市| 安图县| 北辰区| 永川市| 敖汉旗| 于都县| 台山市| 呼玛县| 太仓市| 江西省| 卢龙县| 敦煌市| 鲜城| 阳新县| 雷州市| 霍州市| 军事| 天峨县| 高安市| 肃北| 玉门市| 永年县| 桑日县| 香河县| 泸州市|