<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>mah666hhh</author_name>
  <author_url>https://blog.hatena.ne.jp/mah666hhh/</author_url>
  <blog_title>スリ飯屋MaLankaのフリーエンジニアな日々</blog_title>
  <blog_url>https://www.malanka.org/</blog_url>
  <categories>
    <anon>技術関連</anon>
    <anon>技術関連 - Vue.js</anon>
  </categories>
  <description>現在のパスは、 this.$route.path で取得出来る。 リファレンス https://router.vuejs.org/ja/api/#router-onerror 例、現在のパスによってリダイレクト先を変える関数 # js:some_component.vue redirectToRoot: function() { // 現在のパスを取得 console.log(this.$route.path) if (this.$route.path === '/') this.$router.push({ path: '/home' }) else this.$router.push({ path: '/' }) this.$router.go({ path: this.currentRoutePath }) } }</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.malanka.org%2Fentry%2F2020%2F01%2F06%2F082533&quot; title=&quot;【Vue.js】  現在のパス(URL)を取得する 【Vue-Router】 - スリ飯屋MaLankaのフリーエンジニアな日々&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/m/mah666hhh/20201119/20201119140017.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-01-06 08:25:33</published>
  <title>【Vue.js】  現在のパス(URL)を取得する 【Vue-Router】</title>
  <type>rich</type>
  <url>https://www.malanka.org/entry/2020/01/06/082533</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
