summaryrefslogtreecommitdiffstats
path: root/framework/src/onos/web/gui/src/main/webapp/_sdh/ng-examples/ch08-03-filter-arrays.html
diff options
context:
space:
mode:
authorCNlucius <lukai1@huawei.com>2016-09-13 11:40:12 +0800
committerCNlucius <lukai1@huawei.com>2016-09-13 11:41:53 +0800
commitb731e2f1dd0972409b136aebc7b463dd72c9cfad (patch)
tree5107d7d80c19ad8076c2c97c2b5ef8d1cf3ab903 /framework/src/onos/web/gui/src/main/webapp/_sdh/ng-examples/ch08-03-filter-arrays.html
parentee93993458266114c29271a481ef9ce7ce621b2a (diff)
ONOSFW-171
O/S-SFC-ONOS scenario documentation Change-Id: I51ae1cf736ea24ab6680f8edca1b2bf5dd598365 Signed-off-by: CNlucius <lukai1@huawei.com>
Diffstat (limited to 'framework/src/onos/web/gui/src/main/webapp/_sdh/ng-examples/ch08-03-filter-arrays.html')
-rw-r--r--framework/src/onos/web/gui/src/main/webapp/_sdh/ng-examples/ch08-03-filter-arrays.html86
1 files changed, 0 insertions, 86 deletions
diff --git a/framework/src/onos/web/gui/src/main/webapp/_sdh/ng-examples/ch08-03-filter-arrays.html b/framework/src/onos/web/gui/src/main/webapp/_sdh/ng-examples/ch08-03-filter-arrays.html
deleted file mode 100644
index a9ce3cae..00000000
--- a/framework/src/onos/web/gui/src/main/webapp/_sdh/ng-examples/ch08-03-filter-arrays.html
+++ /dev/null
@@ -1,86 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
- <title>Filters in Action</title>
- <script src="../../tp/angular.js"></script>
-</head>
-<body ng-app="filtersApp">
-
- <div ng-controller="FilterCtrl as ctrl">
-
- <table>
- <tr>
- <td>
- <button ng-click="ctrl.currentFilter = 'string'">
- Filter with string
- </button>
- </td>
- <td>
- Filter Text
- <input type="text"
- ng-model="ctrl.filterOptions['string']"/>
- </td>
- </tr>
- <tr>
- <td>
- <button ng-click="ctrl.currentFilter = 'object'">
- Filter with object
- </button>
- </td>
- <td>
- Show Done or Not Done
- <input type="checkbox"
- ng-model="ctrl.filterOptions['object'].done"/>
- </td>
- </tr>
- <tr>
- <td>
- <button ng-click="ctrl.currentFilter = 'function'">
- Filter with function
- </button>
- </td>
- </tr>
- </table>
- <ul>
- <li ng-repeat="note in ctrl.notes |
- filter:ctrl.filterOptions[ctrl.currentFilter] |
- orderBy:ctrl.sortOrder |
- limitTo:5">
- {{note.label}} - {{note.type}} - {{note.done}}
- </li>
- </ul>
- </div>
-
-
- <script type="text/javascript">
- angular.module('filtersApp', [])
- .controller('FilterCtrl', [function () {
- var self = this;
-
- self.notes = [
- {label: 'FC Todo', type: 'chore', done: false},
- {label: 'FT Todo', type: 'task', done: false},
- {label: 'FF Todo', type: 'fun', done: true},
- {label: 'SC Todo', type: 'chore', done: false},
- {label: 'ST Todo', type: 'task', done: true},
- {label: 'SF Todo', type: 'fun', done: true},
- {label: 'TC Todo', type: 'chore', done: false},
- {label: 'TT Todo', type: 'task', done: false},
- {label: 'TF Todo', type: 'fun', done: false}
- ];
-
- self.sortOrder = ['+type', '-label'];
-
- self.filterOptions = {
- 'string': '',
- 'object': {done: false, label: 'F'},
- 'function': function (note) {
- return note.type === 'task' && note.done === false;
- }
- };
-
- self.currentFilter = 'string';
- }]);
- </script>
-</body>
-</html>