Last active
May 17, 2020 18:55
-
-
Save splincode/ccb29f8bc573455a9477c36ab63adfc0 to your computer and use it in GitHub Desktop.
This file contains 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
// novels.state.ts | |
@Persistence({ | |
existingEngine: sessionStorage | |
}) | |
@State<Novel[]>({ | |
name: 'novels', | |
defaults: [] | |
}) | |
@Injectable() | |
export class NovelsState {} | |
// detectives.state.ts | |
@Persistence() // localStorage by default in existingEngine | |
@State<Detective[]>({ | |
name: 'detectives', | |
defaults: [] | |
}) | |
@Injectable() | |
export class DetectivesState {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment