From 64709bd9b4f00979dd9c381b2d80368b498ec6b1 Mon Sep 17 00:00:00 2001 From: Mark Nadal Date: Thu, 22 Jan 2015 18:08:48 -0700 Subject: [PATCH] added Forrest's Todo Example and made example directory --- examples/angular/index.html | 4 +-- examples/index.html | 15 +++++++++++ examples/todo/index.html | 50 +++++++++++++++++++++++++++---------- 3 files changed, 54 insertions(+), 15 deletions(-) create mode 100644 examples/index.html diff --git a/examples/angular/index.html b/examples/angular/index.html index f4bd3bb1..4a32c5ea 100644 --- a/examples/angular/index.html +++ b/examples/angular/index.html @@ -53,7 +53,7 @@ var gun = Gun(location.origin + '/gun'); angular.module('admin', []).controller('editor', function($scope){ $scope.data = {}; - $scope.$data = gun.load('example/angular/todo').blank(function(){ + $scope.$data = gun.load('example/angular/data').blank(function(){ console.log("Initializing Data!"); this.set({}); }).on(function(data){ @@ -63,7 +63,7 @@ }); $scope.$apply(); }); - $scope.add = function(a,b,c){ + $scope.add = function(){ $scope.$data.path($scope.field).set( $scope.data[$scope.field] = 'value' ); $scope.field = ''; }; diff --git a/examples/index.html b/examples/index.html new file mode 100644 index 00000000..bc0e28e6 --- /dev/null +++ b/examples/index.html @@ -0,0 +1,15 @@ + + +

Examples Directory

+ + + + + diff --git a/examples/todo/index.html b/examples/todo/index.html index 7bfbdd55..59006a58 100644 --- a/examples/todo/index.html +++ b/examples/todo/index.html @@ -1,15 +1,39 @@ - - ToDo - - -

- Todo List -

-
- - - -
+ +

ToDo List

+ +
+ + + + - \ No newline at end of file +