Skip to content

Commit 5561aba

Browse files
authored
fix(vue-class-component): path attachment to route components (#32)
closes #31
1 parent b19adc2 commit 5561aba

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ export default function install(Vue, {routes}) {
1111

1212
Object.keys(routes).map(path => {
1313
routes[path].component.__path = path
14+
// this is required to attach the path to vue-class-components. See #31
15+
if(routes[path].component.options) {
16+
routes[path].component.options.__path = path;
17+
}
1418
})
1519

1620
Vue.mixin({

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy