Created
June 3, 2018 14:40
-
-
Save amcdnl/0b3aedba5f8ec9060798b75c5f87eaad to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@NgModule({ | |
imports: [ | |
NgxsModule.forRoot([]), | |
NgxsStoragePluginModule.forRoot({ | |
migrations: [ | |
{ | |
version: 1, | |
key: 'zoo', | |
versionKey: 'myVersion', | |
migrate: (state) => { | |
return { | |
newAnimals: state.animals, | |
version: 2 // Important to set this to the next version! | |
} | |
} | |
} | |
] | |
}) | |
], | |
}) | |
export class MyModule {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment