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

+4
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)