Skip to content

Commit bdc474d

Browse files
committed
feat(dependencies): upgrade to Angular 8, Typescript 3.4, RxJs 3.4...
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
1 parent 6bd4763 commit bdc474d

File tree

8 files changed

+5308
-8283
lines changed

8 files changed

+5308
-8283
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ multiple model support and immutable data exposed as RxJS Observable.
5151
template: `
5252
<!-- template subscription to todos using async pipe -->
5353
<ng-container *ngIf="todoService.todos$ | async as todos">
54-
<h1>Todos ({{todos.length}})</h1>
54+
<h1>Todos ({{ todos.length }})</h1>
5555
<ul>
5656
<li *ngFor="let todo of todos">
57-
{{todo.prop}}
57+
{{ todo.prop }}
5858
</li>
5959
</ul>
6060
<button (click)="addTodo()">Add todo</button>

lib/model/model.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@ export class Model<T> {
1515
) {
1616
this._data = new BehaviorSubject(initialData);
1717
this.data$ = this._data.asObservable().pipe(
18-
map(
19-
(data: T) =>
20-
immutable
21-
? clone
22-
? clone(data)
23-
: JSON.parse(JSON.stringify(data))
24-
: data
18+
map((data: T) =>
19+
immutable
20+
? clone
21+
? clone(data)
22+
: JSON.parse(JSON.stringify(data))
23+
: data
2524
),
2625
sharedSubscription ? shareReplay(1) : map((data: T) => data)
2726
);

0 commit comments

Comments
 (0)