All Projects → tomastrajan → angular-model-pattern-example

tomastrajan / angular-model-pattern-example

Licence: other
Model pattern for Angular (2, 4, ...), manage and share your state with simple services using RxJS Subjects and Observables

Programming Languages

HTML
75241 projects
typescript
32286 projects
CSS
56736 projects
javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to angular-model-pattern-example

gitlab-teams
🦊 Follow merge requests (&more) like a boss 🦊
Stars: ✭ 38 (+2.7%)
Mutual labels:  rxjs
ccex-api
Cryptocurrency exchanges realtime api wrapper
Stars: ✭ 29 (-21.62%)
Mutual labels:  rxjs
rxhr
Tiny Observable based HTTP client for browsers
Stars: ✭ 15 (-59.46%)
Mutual labels:  rxjs
react-nonav
Experimental React Native declarative navigation
Stars: ✭ 58 (+56.76%)
Mutual labels:  rxjs
ngx-translate-module-loader
Highly configurable and flexible translations loader for @ngx-translate/core
Stars: ✭ 31 (-16.22%)
Mutual labels:  rxjs
rxjs-sort-visualization
sorting algorithm visualization build by Rxjs 🐠
Stars: ✭ 16 (-56.76%)
Mutual labels:  rxjs
rxremote
Subscribe to RxJs Observables on a remote server through a WebSocket
Stars: ✭ 27 (-27.03%)
Mutual labels:  rxjs
reactive-angular-workshop
This is the source code for the world's greatest Reactive Angular Workshop.
Stars: ✭ 30 (-18.92%)
Mutual labels:  rxjs
firebase-rxjs
Firebase with Observables, Type Checking of Schema, Zone.js aware and Angular ready.
Stars: ✭ 17 (-54.05%)
Mutual labels:  rxjs
fullstack-typescript
A demo project of a full stack typescript application
Stars: ✭ 28 (-24.32%)
Mutual labels:  rxjs
learnrxjs
Русскоязычная документация RxJS
Stars: ✭ 20 (-45.95%)
Mutual labels:  rxjs
thruway.js
RxJS WAMPv2 Client
Stars: ✭ 28 (-24.32%)
Mutual labels:  rxjs
ng-effects
Reactivity system for Angular. https://ngfx.io
Stars: ✭ 46 (+24.32%)
Mutual labels:  rxjs
vuse-rx
Vue 3 + rxjs = ❤
Stars: ✭ 52 (+40.54%)
Mutual labels:  rxjs
ng-observe
Angular reactivity streamlined...
Stars: ✭ 65 (+75.68%)
Mutual labels:  rxjs
rdeco
响应式对象编程库,从时间和空间上解耦你的代码
Stars: ✭ 54 (+45.95%)
Mutual labels:  rxjs
observer-spy
This library makes RxJS Observables testing easy!
Stars: ✭ 310 (+737.84%)
Mutual labels:  rxjs
react-rxjs-flux
a small library for creating applications based on unidirectional data flow
Stars: ✭ 22 (-40.54%)
Mutual labels:  rxjs
djadmin
Djadmin is a django admin theme
Stars: ✭ 42 (+13.51%)
Mutual labels:  materializecss
materialize-social
Social Login Buttons for MaterializeCSS
Stars: ✭ 50 (+35.14%)
Mutual labels:  materializecss

Model pattern for Angular by @tomastrajan Build Status

Model pattern is now available as library too !

  • Check out ngx-model or just install library using npm i -S ngx-model.

    All existing documentation is still valid, ngx-model just provides convenient way of using model pattern without need to copy model code by hand.

Documentation

Getting started

  1. Create model.service.ts with following content.
  2. Import and provide MODEL_PROVIDER (from model.service.ts) constant in your CoreModule (use AppModule in case you don't have CoreModule)
  3. 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$)
  4. 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

Built with Angular CLI

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].