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

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.

主站蜘蛛池模板: 双城市| 合江县| 茶陵县| 新密市| 财经| 宁津县| 龙游县| 临洮县| 台安县| 隆回县| 扎囊县| 化隆| 阿荣旗| 汾西县| 页游| 铁岭县| 长海县| 黔东| 肃北| 永登县| 高阳县| 达尔| 黔西| 兴文县| 深圳市| 枣阳市| 云安县| 桦甸市| 平塘县| 句容市| 金湖县| 古浪县| 措美县| 革吉县| 白山市| 湘潭县| 西盟| 都昌县| 会宁县| 芷江| 鄂伦春自治旗|