-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Key option is not working #123
Comments
Can you provide an example repository and explain the issue more detailed? |
I updated the example project including a key and a migration
Does that help you? |
I had the same issue. The problem here is that you must use a state token or a string rather than pass in the In other words:
Works for the
Later update: My problem was that I was using a |
Also, I might add that if you are using a |
@nvahalik : Thanks for your inputs. We still couldn't manage to make the async storage work with keys, despite using the mentioned state tokens. Neither does it work when using just the state class within the "key" array. Can you maybe point us to the right direction? Thanks in advance! App Module
State
PS: In CustomStateStorageClass we're using the Storage Module from Ionic, which is working perfectly fine when not using "key". |
Hi Daniel,
We stopped using this plugin for now since it was causing too many
issues. I am not able to provide any other feedback at this time.
…On 2 Mar 2021, at 4:11, Daniel Mägerli wrote:
@nvahalik : Thanks for your inputs. We still couldn't manage to make
the async storage work with keys, despite using the mentioned state
tokens. Can you maybe point us to the right direction? Thanks in
advance!
App Module
```
NgxsAsyncStoragePluginModule.forRoot(CustomStateStorageClass,
{
key: [
// --- persistent ---
SOME_STATE_TOKEN,
```
State
```
const STATE_NAME = "someStateName";
export const SOME_STATE_TOKEN = new
StateToken<SomeStateModel>(STATE_NAME);
const DEFAULT_STATE: SomeStateModel = {
someContent: []
};
@State<SomeStateModel>({
name: STATE_NAME,
defaults: DEFAULT_STATE,
})
```
PS: In CustomStateStorageClass we're using the Storage Module from
Ionic, which is working perfectly fine when not using "key".
--
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#123 (comment)
|
I think that key option is not working.
The text was updated successfully, but these errors were encountered: