In the app I’m working on, we have the concept of workspaces. We’re currently saving the workspace ID into local storage when enter the workspace route. In the application adapter, we’re scoping requests to prefix the url path with
/workspaces/:id when the workspace id is present in localStorage. For example, when doing
this.store.find('projects') would usually fire a request to
/projects, inside a workspace, it sends the request to
Is keeping this application state in localStorage a bad idea? Is there a better way to do it? I certainly have concerns that this is fragile and feel that storing the current workspace in the application container would be a better idea. That said, I’m not yet sure how to access the container from an adapter. Work to do.