Skip to content

Instantly share code, notes, and snippets.

@splincode
Created May 17, 2020 17:54
Show Gist options
  • Save splincode/8010314d3997c0e98873420fc1162bdb to your computer and use it in GitHub Desktop.
Save splincode/8010314d3997c0e98873420fc1162bdb to your computer and use it in GitHub Desktop.
// novels.state.ts
@State<Novel[]>({
name: 'novels',
defaults: []
})
@Injectable()
export class NovelsState {}
// detectives.state.ts
@State<Detective[]>({
name: 'detectives',
defaults: []
})
@Injectable()
export class DetectivesState {}
@NgModule({
imports: [
NgxsStoragePluginModule.forRoot({
key: [NovelsState, DetectivesState]
})
]
})
export class AppModule {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment