Skip to content

Loading state async #20

Closed
Closed
@xeor

Description

@xeor

I'm trying to load the initial state using axios, but I think it is too late to load the state when axios are able to get it from the backend.

Based on what I can read in the source, everything in vue-golden-layout that deals with loading the state happens in the mounted() function.. I have been playing with vue route-guard (beforeRouteEnter), the only place I can populate this, would be after the vue-golden-layout is already loaded..

Will using a guard (https://router.vuejs.org/guide/advanced/navigation-guards.html#in-component-guards) be a way? Is there a complete other way of doing this? Or am I missing something?
I guess setting localStorage inside a guard might work.. But now sure if that is the way to do it..?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions