Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: amark/gun
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 181b6bd7678886dcdebf81d78f32c8459b09f132
Choose a base ref
...
head repository: amark/gun
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9b752c3937ba3a9d2ec417fb06f6cdb6edd344ca
Choose a head ref
  • 20 commits
  • 56 files changed
  • 7 contributors

Commits on Apr 3, 2017

  1. Add FOSSA badges

    xizhao authored Apr 3, 2017

    Verified

    This commit was signed with the committer’s verified signature.
    xrmx Riccardo Magliocchetti
    Copy the full SHA
    3f883cb View commit details

Commits on Apr 4, 2017

  1. Merge pull request #354 from xizhao/patch-1

    Add FOSSA badges
    amark authored Apr 4, 2017

    Verified

    This commit was signed with the committer’s verified signature.
    xrmx Riccardo Magliocchetti
    Copy the full SHA
    412a47f View commit details

Commits on Apr 5, 2017

  1. Verified

    This commit was signed with the committer’s verified signature.
    xrmx Riccardo Magliocchetti
    Copy the full SHA
    6950f7d View commit details

Commits on Apr 8, 2017

  1. Create index.html

    Napzu authored Apr 8, 2017

    Verified

    This commit was signed with the committer’s verified signature.
    xrmx Riccardo Magliocchetti
    Copy the full SHA
    6b3e8f9 View commit details

Commits on Apr 10, 2017

  1. uggh ws & uws

    amark committed Apr 10, 2017

    Partially verified

    This commit is signed with the committer’s verified signature.
    xrmx’s contribution has been verified via SSH key.
    We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
    Copy the full SHA
    fc74a80 View commit details

Commits on Apr 11, 2017

  1. Add vue+gun todo app

    sjones6 committed Apr 11, 2017
    1

    Verified

    This commit was signed with the committer’s verified signature.
    xrmx Riccardo Magliocchetti
    Copy the full SHA
    deb5ef2 View commit details
  2. Merge pull request #360 from sjones6/sjones6/vue-gun

    Add vue+gun todo app
    amark authored Apr 11, 2017

    Verified

    This commit was signed with the committer’s verified signature.
    xrmx Riccardo Magliocchetti
    Copy the full SHA
    2c2530f View commit details
  3. Merge pull request #361 from Napzu/patch-1

    Create index.html
    amark authored Apr 11, 2017

    Verified

    This commit was signed with the committer’s verified signature.
    xrmx Riccardo Magliocchetti
    Copy the full SHA
    dfa1c6d View commit details

Commits on Apr 12, 2017

  1. 404 removed

    marcus7777 authored Apr 12, 2017

    Verified

    This commit was signed with the committer’s verified signature.
    xrmx Riccardo Magliocchetti
    Copy the full SHA
    52c5dcd View commit details
  2. Merge pull request #362 from marcus7777/patch-1

    404 removed
    amark authored Apr 12, 2017

    Partially verified

    This commit is signed with the committer’s verified signature.
    xrmx’s contribution has been verified via SSH key.
    We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
    Copy the full SHA
    f1cea0b View commit details

Commits on Apr 14, 2017

  1. Dependency Updates ...

    lguzzon committed Apr 14, 2017
    Copy the full SHA
    35162b1 View commit details
  2. Auto Dependency Updates ...

    lguzzon committed Apr 14, 2017
    Copy the full SHA
    be3a9e8 View commit details
  3. Added node 7.8.0

    lguzzon authored Apr 14, 2017
    Copy the full SHA
    5cca2f1 View commit details
  4. Using node latest

    lguzzon authored Apr 14, 2017
    Copy the full SHA
    2138635 View commit details
  5. Using node 7.9

    lguzzon authored Apr 14, 2017
    Copy the full SHA
    9cafdcf View commit details

Commits on Apr 16, 2017

  1. Merge pull request #363 from lguzzon/master

    Dependency Updates ...
    amark authored Apr 16, 2017
    Copy the full SHA
    40a188b View commit details

Commits on Apr 18, 2017

  1. add bare angular project

    victornoel committed Apr 18, 2017
    Copy the full SHA
    b4172a0 View commit details
  2. use gun for todo list

    victornoel committed Apr 18, 2017
    Copy the full SHA
    46c9c63 View commit details
  3. Merge pull request #365 from victornoel/angular-demo

    Angular demo
    amark authored Apr 18, 2017
    Copy the full SHA
    1fd2bfa View commit details

Commits on Apr 21, 2017

  1. Copy the full SHA
    9b752c3 View commit details
Showing with 1,535 additions and 479 deletions.
  1. +1 −0 .travis.yml
  2. +4 −1 README.md
  3. +2 −2 e2e/package.json
  4. +57 −0 examples/angular/.angular-cli.json
  5. +13 −0 examples/angular/.editorconfig
  6. +42 −0 examples/angular/.gitignore
  7. +28 −0 examples/angular/README.md
  8. +14 −0 examples/angular/e2e/app.e2e-spec.ts
  9. +11 −0 examples/angular/e2e/app.po.ts
  10. +12 −0 examples/angular/e2e/tsconfig.e2e.json
  11. +44 −0 examples/angular/karma.conf.js
  12. +49 −0 examples/angular/package.json
  13. +30 −0 examples/angular/protractor.conf.js
  14. +20 −0 examples/angular/server.js
  15. +7 −0 examples/angular/src/app/app.component.css
  16. +11 −0 examples/angular/src/app/app.component.html
  17. +32 −0 examples/angular/src/app/app.component.spec.ts
  18. +33 −0 examples/angular/src/app/app.component.ts
  19. +29 −0 examples/angular/src/app/app.module.ts
  20. 0 examples/angular/src/assets/.gitkeep
  21. +3 −0 examples/angular/src/environments/environment.prod.ts
  22. +8 −0 examples/angular/src/environments/environment.ts
  23. BIN examples/angular/src/favicon.ico
  24. +14 −0 examples/angular/src/index.html
  25. +14 −0 examples/angular/src/main.ts
  26. +68 −0 examples/angular/src/polyfills.ts
  27. +1 −0 examples/angular/src/styles.css
  28. +32 −0 examples/angular/src/test.ts
  29. +13 −0 examples/angular/src/tsconfig.app.json
  30. +20 −0 examples/angular/src/tsconfig.spec.json
  31. +5 −0 examples/angular/src/typings.d.ts
  32. +20 −0 examples/angular/tsconfig.json
  33. +116 −0 examples/angular/tslint.json
  34. +2 −2 examples/react/package.json
  35. +131 −0 examples/vue/index.html
  36. +163 −0 examples/vue/todo.html
  37. +145 −229 gun.js
  38. +1 −1 gun.min.js
  39. +23 −3 lib/file.js
  40. +1 −0 lib/uws.js
  41. +1 −0 lib/ws.js
  42. +9 −9 package.json
  43. +5 −3 src/HAM.js
  44. +3 −5 src/adapters/localStorage.js
  45. +29 −20 src/chain.js
  46. +2 −2 src/graph.js
  47. +15 −1 src/index.js
  48. +0 −166 src/key.js
  49. +2 −1 src/node.js
  50. +1 −0 src/not.js
  51. +1 −0 src/path.js
  52. +6 −2 src/put.js
  53. +68 −22 src/root.js
  54. +12 −5 src/state.js
  55. +22 −5 test/common.js
  56. +140 −0 test/panic/s2s-all.js
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -6,3 +6,4 @@ node_js:
- 4.2
- 5.0
- 6.8
- 7.9
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@
[![npm](https://img.shields.io/npm/dm/gun.svg)](https://www.npmjs.com/package/gun)
[![Travis](https://img.shields.io/travis/amark/gun/master.svg)](https://travis-ci.org/amark/gun)
[![Gitter](https://img.shields.io/gitter/room/amark/gun.js.svg)](https://gitter.im/amark/gun)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Famark%2Fgun.svg?size=small)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Famark%2Fgun?ref=badge_small)

GUN is a realtime, distributed, offline-first, graph database engine. Doing **[25M+](https://github.com/amark/gun/wiki/100000-ops-sec-in-IE6-on-2GB-Atom-CPU) ops/sec** in just **~12KB** gzipped.

@@ -145,11 +146,13 @@ GUN is designed to be as minimal as possible, with any additional functionality

Designed with ♥ by Mark Nadal, the gun team, and many amazing contributors. Liberally licensed under [Zlib / MIT / Apache 2.0](https://github.com/amark/gun/blob/master/LICENSE.md).

[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Famark%2Fgun.svg?size=large)](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Famark%2Fgun?ref=badge_large)

## Contributors

Thanks to the following people who have contributed to GUN, via code, issues, or conversation (this list has quickly become tremendously behind! We'll probably turn this into a dedicated wiki page so you can add yourself):

[agborkowski](https://github.com/agborkowski); **:star:[alanmimms](https://github.com/alanmimms)**; [alexlafroscia](https://github.com/alexlafroscia); [anubiann00b](https://github.com/anubiann00b); **[BrockAtkinson](https://github.com/BrockAtkinson) ([brunch config](https://github.com/BrockAtkinson/brunch-gun))**; [bromagosa](https://github.com/bromagosa); **[Brysgo](https://github.com/brysgo) ([GraphQL](https://github.com/brysgo/graphql-gun))**; [coolaj86](https://github.com/coolaj86); [d-oliveros](https://github.com/d-oliveros), [danscan](https://github.com/danscan); **[forrestjt](https://github.com/forrestjt) ([file.js](https://github.com/amark/gun/blob/master/lib/file.js))**; [gedw99](https://github.com/gedw99); [HelloCodeMing](https://github.com/HelloCodeMing); **[JosePedroDias](https://github.com/josepedrodias) ([graph visualizer](http://acor.sl.pt:9966))**; **[JuniperChicago](https://github.com/JuniperChicago) ([cycle.js bindings](https://github.com/JuniperChicago/cycle-gun))**; **[jveres](https://github.com/jveres) ([todoMVC](https://github.com/jveres/todomvc))**; **[kristianmandrup](https://github.com/kristianmandrup) ([edge](https://github.com/kristianmandrup/gun-edge))**; [ndarilek](https://github.com/ndarilek); [onetom](https://github.com/onetom); [phpnode](https://github.com/phpnode); [PsychoLlama](https://github.com/PsychoLlama); **[RangerMauve](https://github.com/RangerMauve) ([schema](https://github.com/gundb/gun-schema))**; **[robertheessels](https://github.com/swifty) ([gun-p2p-auth](https://github.com/swifty/gun-p2p-auth))**; [riston](https://github.com/riston); [rootsical](https://github.com/rootsical); [rrrene](https://github.com/rrrene); [sbeleidy](https://github.com/sbeleidy); **:star:[Sean Matheson](https://github.com/ctrlplusb) ([Observable/RxJS/Most.js bindings](https://github.com/ctrlplusb/gun-most))**; [ssr1ram](https://github.com/ssr1ram); **[Stefdv](https://github.com/stefdv) ([Polymer/web components](http://stefdv.github.io/gun-collection/components/gun-collection/))**; [Xe](https://github.com/Xe); [zot](https://github.com/zot); [ayurmedia](https://github.com/ayurmedia);
[agborkowski](https://github.com/agborkowski); **:star:[alanmimms](https://github.com/alanmimms)**; [alexlafroscia](https://github.com/alexlafroscia); [anubiann00b](https://github.com/anubiann00b); **[BrockAtkinson](https://github.com/BrockAtkinson) ([brunch config](https://github.com/BrockAtkinson/brunch-gun))**; [bromagosa](https://github.com/bromagosa); **[Brysgo](https://github.com/brysgo) ([GraphQL](https://github.com/brysgo/graphql-gun))**; [coolaj86](https://github.com/coolaj86); [d-oliveros](https://github.com/d-oliveros), [danscan](https://github.com/danscan); **[forrestjt](https://github.com/forrestjt) ([file.js](https://github.com/amark/gun/blob/master/lib/file.js))**; [gedw99](https://github.com/gedw99); [HelloCodeMing](https://github.com/HelloCodeMing); **[JosePedroDias](https://github.com/josepedrodias) ([graph visualizer](http://acor.sl.pt:9966))**; **[JuniperChicago](https://github.com/JuniperChicago) ([cycle.js bindings](https://github.com/JuniperChicago/cycle-gun))**; **[jveres](https://github.com/jveres) ([todoMVC](https://github.com/jveres/todomvc))**; **[kristianmandrup](https://github.com/kristianmandrup) ([edge](https://github.com/kristianmandrup/gun-edge))**; [ndarilek](https://github.com/ndarilek); [onetom](https://github.com/onetom); [phpnode](https://github.com/phpnode); [PsychoLlama](https://github.com/PsychoLlama); **[RangerMauve](https://github.com/RangerMauve) ([schema](https://github.com/gundb/gun-schema))**; **[robertheessels](https://github.com/swifty) ([gun-p2p-auth](https://github.com/swifty/gun-p2p-auth))**; [riston](https://github.com/riston); [rootsical](https://github.com/rootsical); [rrrene](https://github.com/rrrene); [sbeleidy](https://github.com/sbeleidy); **:star:[Sean Matheson](https://github.com/ctrlplusb) ([Observable/RxJS/Most.js bindings](https://github.com/ctrlplusb/gun-most))**; [ssr1ram](https://github.com/ssr1ram); **[Stefdv](https://github.com/stefdv) (Polymer/web components)**; [Xe](https://github.com/Xe); [zot](https://github.com/zot); [ayurmedia](https://github.com/ayurmedia);

This list of contributors was manually compiled and alphabetically sorted. If we missed you, please submit an issue so we can get you added!

4 changes: 2 additions & 2 deletions e2e/package.json
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
"private": true,
"main": "distributed.js",
"devDependencies": {
"panic-server": "~>0.3.0",
"selenium-webdriver": "~>2.53.2"
"panic-server": ">1.1.0",
"selenium-webdriver": ">3.3.0"
}
}
57 changes: 57 additions & 0 deletions examples/angular/.angular-cli.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"project": {
"name": "angular"
},
"apps": [
{
"root": "src",
"outDir": "dist",
"assets": [
"assets",
"favicon.ico"
],
"index": "index.html",
"main": "main.ts",
"polyfills": "polyfills.ts",
"test": "test.ts",
"tsconfig": "tsconfig.app.json",
"testTsconfig": "tsconfig.spec.json",
"prefix": "app",
"styles": [
"styles.css"
],
"scripts": [],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
}
],
"e2e": {
"protractor": {
"config": "./protractor.conf.js"
}
},
"lint": [
{
"project": "src/tsconfig.app.json"
},
{
"project": "src/tsconfig.spec.json"
},
{
"project": "e2e/tsconfig.e2e.json"
}
],
"test": {
"karma": {
"config": "./karma.conf.js"
}
},
"defaults": {
"styleExt": "css",
"component": {}
}
}
13 changes: 13 additions & 0 deletions examples/angular/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see http://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
42 changes: 42 additions & 0 deletions examples/angular/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/out-tsc

# dependencies
/node_modules

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
testem.log
/typings

# e2e
/e2e/*.js
/e2e/*.map

# System Files
.DS_Store
Thumbs.db
28 changes: 28 additions & 0 deletions examples/angular/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Angular

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.0.0.

## Development server

Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.

## Code scaffolding

Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive/pipe/service/class/module`.

## Build

Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.

## Running unit tests

Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Running end-to-end tests

Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
Before running the tests make sure you are serving the app via `ng serve`.

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
14 changes: 14 additions & 0 deletions examples/angular/e2e/app.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { AngularPage } from './app.po';

describe('angular App', () => {
let page: AngularPage;

beforeEach(() => {
page = new AngularPage();
});

it('should display message saying app works', () => {
page.navigateTo();
expect(page.getParagraphText()).toEqual('app works!');
});
});
11 changes: 11 additions & 0 deletions examples/angular/e2e/app.po.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { browser, element, by } from 'protractor';

export class AngularPage {
navigateTo() {
return browser.get('/');
}

getParagraphText() {
return element(by.css('app-root h1')).getText();
}
}
12 changes: 12 additions & 0 deletions examples/angular/e2e/tsconfig.e2e.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/e2e",
"module": "commonjs",
"target": "es5",
"types":[
"jasmine",
"node"
]
}
}
44 changes: 44 additions & 0 deletions examples/angular/karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/0.13/config/configuration-file.html

module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular/cli'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular/cli/plugins/karma')
],
client:{
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
files: [
{ pattern: './src/test.ts', watched: false }
],
preprocessors: {
'./src/test.ts': ['@angular/cli']
},
mime: {
'text/x-typescript': ['ts','tsx']
},
coverageIstanbulReporter: {
reports: [ 'html', 'lcovonly' ],
fixWebpackSourcePaths: true
},
angularCli: {
environment: 'dev'
},
reporters: config.angularCli && config.angularCli.codeCoverage
? ['progress', 'coverage-istanbul']
: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
});
};
49 changes: 49 additions & 0 deletions examples/angular/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"name": "angular",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/common": "^4.0.0",
"@angular/compiler": "^4.0.0",
"@angular/core": "^4.0.0",
"@angular/forms": "^4.0.0",
"@angular/http": "^4.0.0",
"@angular/platform-browser": "^4.0.0",
"@angular/platform-browser-dynamic": "^4.0.0",
"@angular/router": "^4.0.0",
"core-js": "^2.4.1",
"express-http-proxy": "^0.11.0",
"gun": "^0.7.2",
"gun-edge": "^0.8.8",
"rxjs": "^5.3.0",
"zone.js": "^0.8.4"
},
"devDependencies": {
"@angular/cli": "1.0.0",
"@angular/compiler-cli": "^4.0.0",
"@types/jasmine": "2.5.38",
"@types/node": "~6.0.60",
"codelyzer": "~2.0.0",
"jasmine-core": "~2.5.2",
"jasmine-spec-reporter": "~3.2.0",
"karma": "~1.4.1",
"karma-chrome-launcher": "~2.0.0",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^0.2.0",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.0",
"ts-node": "~2.0.0",
"tslint": "~4.5.0",
"typescript": "~2.2.0"
}
}
30 changes: 30 additions & 0 deletions examples/angular/protractor.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts

const { SpecReporter } = require('jasmine-spec-reporter');

exports.config = {
allScriptsTimeout: 11000,
specs: [
'./e2e/**/*.e2e-spec.ts'
],
capabilities: {
'browserName': 'chrome'
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
beforeLaunch: function() {
require('ts-node').register({
project: 'e2e/tsconfig.e2e.json'
});
},
onPrepare() {
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
};
20 changes: 20 additions & 0 deletions examples/angular/server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
var port = process.env.OPENSHIFT_NODEJS_PORT || process.env.VCAP_APP_PORT || process.env.PORT || process.argv[2] || 8080;
var host = process.env.OPENSHIFT_NODEJS_HOST || process.env.VCAP_APP_HOST || process.env.HOST || 'localhost';

var express = require('express');
var proxy = require('express-http-proxy');
var http = require('http');
var app = express();
var server = http.createServer(app);

var Gun = require('gun');
var gun = Gun({
file: 'data.json',
web: server
});

app.use(Gun.serve);
app.use(proxy(host + ':4200'));
server.listen(port);

console.log('Server started on port ' + port + ' with /gun');
7 changes: 7 additions & 0 deletions examples/angular/src/app/app.component.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
html, body { font-size: 14pt; padding: 10px 2.5%;}
.hide { display: none; }
form .who { width: 10%; }
form .what { width: 80%; }
ul { list-style: none; padding: 0; }
ul .when {color: #555; font-size: 12pt; float: right; display: none; }
li:hover .when {display: inline;}
11 changes: 11 additions & 0 deletions examples/angular/src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<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">{{todo.val}}</li>
</ul>
</div>
Loading