gun
Version:
A realtime, decentralized, offline-first, graph data synchronization engine.
14 lines (12 loc) • 489 B
HTML
<div>
<form (ngSubmit)="add()">
<input type="text" [(ngModel)]="newTodo" name="newTodo" placeholder="New TODO">
<button type="submit" *ngIf="newTodo" [disabled]="newTodo?.trim().length === 0">Add</button>
</form>
<br />
<ul>
<li *ngFor="let todo of todos$ | async | pairs" (click)="delete(todo[0])">{{todo[1]}}</li>
</ul>
<button (click)="sub()" *ngIf="!todosSub">Log in console</button>
<button (click)="unsub()" *ngIf="!!todosSub">Stop logging</button>
</div>