Skip to content

Commit

Permalink
feat(dependencies): upgrade to Angular 8, Typescript 3.4, RxJs 3.4...
Browse files Browse the repository at this point in the history
BREAKING CHANGE - peer depenencies updated to work in Angular 8 ecosystem

- rework schematics tests to follow new async APIs
- docs cleanup
- formatting based on latest prettier
  • Loading branch information
tomastrajan committed Jun 2, 2019
1 parent 6bd4763 commit bdc474d
Show file tree
Hide file tree
Showing 8 changed files with 5,308 additions and 8,283 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ multiple model support and immutable data exposed as RxJS Observable.
template: `
<!-- template subscription to todos using async pipe -->
<ng-container *ngIf="todoService.todos$ | async as todos">
<h1>Todos ({{todos.length}})</h1>
<h1>Todos ({{ todos.length }})</h1>
<ul>
<li *ngFor="let todo of todos">
{{todo.prop}}
{{ todo.prop }}
</li>
</ul>
<button (click)="addTodo()">Add todo</button>
Expand Down
13 changes: 6 additions & 7 deletions lib/model/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@ export class Model<T> {
) {
this._data = new BehaviorSubject(initialData);
this.data$ = this._data.asObservable().pipe(
map(
(data: T) =>
immutable
? clone
? clone(data)
: JSON.parse(JSON.stringify(data))
: data
map((data: T) =>
immutable
? clone
? clone(data)
: JSON.parse(JSON.stringify(data))
: data
),
sharedSubscription ? shareReplay(1) : map((data: T) => data)
);
Expand Down
Loading

0 comments on commit bdc474d

Please sign in to comment.