diff --git a/client/src/index.html b/client/src/index.html index 518c619..6cccacc 100644 --- a/client/src/index.html +++ b/client/src/index.html @@ -6,6 +6,7 @@ +
diff --git a/client/src/node_modules/falcorClient/falcorClient.css b/client/src/node_modules/falcorClient/falcorClient.css new file mode 100644 index 0000000..904d046 --- /dev/null +++ b/client/src/node_modules/falcorClient/falcorClient.css @@ -0,0 +1,3 @@ +#falcorClientForm .input-group { + margin-bottom: 4px; +} \ No newline at end of file diff --git a/client/src/node_modules/falcorClient/falcorClient.html b/client/src/node_modules/falcorClient/falcorClient.html index bb9dd3d..dfa2b01 100644 --- a/client/src/node_modules/falcorClient/falcorClient.html +++ b/client/src/node_modules/falcorClient/falcorClient.html @@ -1,74 +1,87 @@
-
- Client -
-
-
-
- - -
-
- - +
+ Client
-
- - +
+ +
+ +
+ +
+ +
+
+
+
+ + +
+
+ + +
+
+ + +
+ + + + +
-
- - +
+
{{$ctrl.response | json}}
- - - - - -
-
{{$ctrl.response | json}}
-
diff --git a/client/src/node_modules/falcorClient/falcorClient.js b/client/src/node_modules/falcorClient/falcorClient.js index dfc5c1f..ae36626 100644 --- a/client/src/node_modules/falcorClient/falcorClient.js +++ b/client/src/node_modules/falcorClient/falcorClient.js @@ -8,16 +8,17 @@ module.exports = angular.module("falcorception.falcorClient", []).component("fal controller($scope, falcor, falcorFactory) { const ctrl = this const model = falcorFactory(ctrl.api.url) + ctrl.paths = [""] ctrl.invalidate = function (paths) { model.invalidate(paths) } ctrl.get = co.wrap(function* (paths) { - yield ctrl.falcorAction("get", arguments) + yield ctrl.falcorAction("get", paths) }) - ctrl.set = co.wrap(function* (paths, values) { + ctrl.set = co.wrap(function* (path, values) { yield ctrl.falcorAction("setValue", arguments) }) @@ -43,5 +44,13 @@ module.exports = angular.module("falcorception.falcorClient", []).component("fal } $scope.$apply() }) + + ctrl.addPath = function() { + ctrl.paths.push("") + } + + ctrl.deletePath = function($index) { + _.pullAt(ctrl.paths, $index) + } }, })