-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.js
43 lines (40 loc) · 1.54 KB
/
example.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
angular.module('example', ['ng-depthchart']);
exampleCtrl = function($scope) {
$scope.basic_example = [
{'header': 'column1', data:[1, 2, 3, 4, 5, 6]},
{'header': 'column2', data:[1, 2, 3]},
{'header': 'column3', data:[1, 2, 3, 4]},
{'header': 'column4', data:[1, 2, 3, 4, 5]},
{'header': 'column5', data:[1, 2, 3, 4, 5, 6]},
{'header': 'column6', data:[1, 2, 3, 4 ]},
{'header': 'column7', data:[1]},
{'header': 'column8', data:[1, 2]}
];
$scope.object_template_for_value = '{{item.value}}';
$scope.object_template_for_uppercase_label = '{{item.label | uppercase}}';
$scope.object_example = [
{'header': 'column1', data:[
{value: 1, label: "thing 1"},
{value: 2, label: "thing 2"},
{value: 3, label: "thing 3"},
{value: 4, label: "thing 4"},
{value: 5, label: "thing 5"},
{value: 6, label: "thing 6"}
]},
{'header': 'column2', data:[
{value: 1, label: "thing 1"},
{value: 2, label: "thing 2"},
{value: 3, label: "thing 3"}
]},
{'header': 'column3', data:[
{value: 1, label: "thing 1"},
{value: 2, label: "thing 2"},
{value: 3, label: "thing 3"},
{value: 4, label: "thing 4"}
]}
];
$scope.alert = function() {
console.log(arguments);
};
$scope.alert_object = '<div><span>{{ item.value }}</span><button ng-click="templateFunction({thing:item.value})"></div>';
};