From b0e221a8d623a80c63a6cb4052767503707be254 Mon Sep 17 00:00:00 2001 From: duart38 Date: Sun, 2 Aug 2020 16:36:39 +0200 Subject: [PATCH] Added instructions for static html pages --- README.md | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 78be057..7e1b4b6 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ [![nest badge](https://nest.land/badge.svg)](https://nest.land/package/Observe) -## Example +## Example (Deno) ```JavaScript let obs = new Observe("initial value"); // new observable with type String @@ -18,6 +18,29 @@ obs.setValue("another value"); // sets the value ``` Also check the examples folder for more examples +## Example (Basic html + js) +> Download Observe.js from the releases tab + +**index.html** +```html + + + +

Observable value test

+ + + + +``` + +**index.js** +```JavaScript +var observable = new Observe("s") +observable.bind((d)=>{ + console.log(d) +}) +observable.setValue("new val") +``` ## Methods ---