You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<svgxmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><pathfill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygonfill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></nav><divclass="carbon-ads"></div><ulclass="sidebar-links"><li><divclass="sidebar-group first"><pclass="sidebar-heading open"><span>API Reference</span><!----></p><ulclass="sidebar-group-items"><li><ahref="/api/options.html" class="sidebar-link">Router Construction Options</a></li><li><ahref="/api/router-instance.html" class="sidebar-link">The Router Instance</a></li><li><ahref="/api/route-object.html" class="sidebar-link">The Route Object</a></li><li><ahref="/api/component-injections.html" class="active sidebar-link">Component Injections</a><ulclass="sidebar-sub-headers"><liclass="sidebar-sub-header"><ahref="/api/component-injections.html#injected-properties" class="sidebar-link">Injected Properties</a></li><liclass="sidebar-sub-header"><ahref="/api/component-injections.html#enabled-options" class="sidebar-link">Enabled Options</a></li></ul></li><li><ahref="/api/router-link.html" class="sidebar-link"><router-link></a></li><li><ahref="/api/router-view.html" class="sidebar-link"><router-view></a></li></ul></div></li></ul></div><divclass="page"><divclass="content"><h1id="component-injections"><ahref="#component-injections" aria-hidden="true" class="header-anchor">#</a> Component Injections</h1><h2id="injected-properties"><ahref="#injected-properties" aria-hidden="true" class="header-anchor">#</a> Injected Properties</h2><p>These properties are injected into every child component by passing the router instance to the root instance as the <code>router</code> option.</p><ul><li><h3id="router"><ahref="#router" aria-hidden="true" class="header-anchor">#</a> $router</h3><p>The router instance.</p></li><li><h3id="route"><ahref="#route" aria-hidden="true" class="header-anchor">#</a> $route</h3><p>The current active <ahref="/api/route-object.html">Route</a>. This property is read-only and its properties are immutable, but it can be watched.</p></li></ul><h2id="enabled-options"><ahref="#enabled-options" aria-hidden="true" class="header-anchor">#</a> Enabled Options</h2><ul><li><p><strong>beforeRouteEnter</strong></p></li><li><p><strong>beforeRouteUpdate</strong> (added in 2.2)</p></li><li><p><strong>beforeRouteLeave</strong></p><p>See <ahref="/advanced/navigation-guards.html#incomponent-guards">In Component Guards</a>.</p></li></ul></div><!----><divclass="content page-nav"><pclass="inner"><spanclass="prev">
0 commit comments