Import and provide MODEL_PROVIDER (from model.service.ts) constant in your CoreModule (use AppModule in case you don't have CoreModule)
Use model in your own services. Import ModelFactory and inject it in service's constructor,
then create model instance with this.model = this.modeFactory.create(initialData).
Expose model with descriptively named variable (eg: this.todos$ = this.model.data$)
Use service in your component. Import and inject service into components constructor.
Subscribe to services data in template todosService.todos$ | async
or explicitly this.todosService.todos$.subscribe(todos => { /* ... */ })
Examples
todos.service.ts - creating model instance and mutating model data
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].