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
when using @component with vue-server-renderer,the ssr code cannot find my custom static method in my custom component which is decorated by @component
version
vue: 2.5.2
vue-class-component: 6.0.0
vue-server-renderer: 2.5.2
vue-router: 3.0.1
typescript: 2.5.3
node: 7.6.0
detail
i want to run my custom static method in my custom component when the vue-router match this component in NodeJS witch is decorated by @component . But when the router has find this component, i can not find my static method in it.
code
Modal.component.ts
@Component({})
export default class Modal extends Vue {
static asyncData( ) {
// ... some code
}
}
entry-server.ts
// main code
const matchedComponents = router.getMatchedComponents( );
matchedComponents.map(( Component: any ) => {
console.log( Component.asyncData );
// it can find Modal Component, but the static method asyncData is undefined here
})
The text was updated successfully, but these errors were encountered:
happened
when using @component with vue-server-renderer,the ssr code cannot find my custom static method in my custom component which is decorated by @component
version
detail
i want to run my custom static method in my custom component when the vue-router match this component in NodeJS witch is decorated by @component . But when the router has find this component, i can not find my static method in it.
code
The text was updated successfully, but these errors were encountered: