1
1
<!doctype html>
2
- < html ng-app =" application " >
2
+ < html >
3
3
< head >
4
4
< meta charset ="utf-8 ">
5
5
< title > Scroller Demo (adapter)</ title >
6
6
< script src ="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.js "> </ script >
7
7
< script src ="../../dist/ui-scroll.js "> </ script >
8
- < script src ="../../dist/ui-scroll-jqlite.js "> </ script >
9
8
< script src ="adapter.js "> </ script >
10
9
< link rel ="stylesheet " href ="../css/style.css " type ="text/css "/>
11
-
12
-
13
10
</ head >
14
11
< body ng-controller ="mainController " ng-app ="application ">
15
12
13
+ < div class ="cont cont-global ">
16
14
15
+ < a class ="back " href ="../index.html "> browse other examples</ a >
17
16
17
+ < h1 class ="page-header page-header-exapmle "> Adapter (updatable scroller)</ h1 >
18
18
19
-
20
- < div class ="cont cont-global ">
21
- < a class ="back " href ="../index.html "> browse other examples</ a >
22
- < h1 class ="page-header page-header-exapmle "> Adapter (updatable scroller)</ h1 >
23
- < div class ="description ">
24
- < ul >
25
- < li > New mechanism of scroller data custom processing is introduced. </ li >
26
- < li > Single datasource but two different viewports with two different processing adapters.</ li >
27
- < li > The firstListAdapter is initially defined on ctrl $scope as a first level object with some property.</ li >
28
- < li > The second.list.adapter chain is not defined on ctrl $scope. The scroller defines it during linking.</ li >
29
- </ ul >
30
- </ div >
31
-
32
- < div class ="viewport-group ">
33
- < h2 class ="viewport-group-tilte "> 1st list</ h2 >
34
-
35
- < div class ="info ">
36
- < span ng-hide ="!firstListAdapter.isLoading "> ...data loading...</ span >
37
- < span ng-hide ="isLoadingOnScope "> 1st list is loaded</ span >
38
- </ div >
39
-
40
- < div class ="actions ">
41
- < button class ="btn btn-default " ng-click ="updateList1() "> update this list</ button >
42
- < button class ="btn btn-default " ng-click ="addToList1() "> add new 3d item</ button >
43
- < button class ="btn btn-default " ng-click ="removeFromList1() "> remove even items</ button >
19
+ < div class ="description ">
20
+ < ul >
21
+ < li > New mechanism of scroller data custom processing is introduced. </ li >
22
+ < li > Single datasource but two different viewports with two different processing adapters.</ li >
23
+ < li > The firstListAdapter is initially defined on ctrl $scope as a first level object with some property.</ li >
24
+ < li > The second.list.adapter chain is not defined on ctrl $scope. The scroller defines it during linking.</ li >
25
+ </ ul >
44
26
</ div >
45
27
46
- < div ui-scroll-viewport class ="viewport viewport-height-fixed " id ="viewport-adapter1 ">
47
- < div class ="item " ui-scroll ="item in datasource "
48
- adapter ="firstListAdapter "
49
- is-loading ="isLoadingOnScope "
50
- buffer-size ='5 '> {{item.content}}</ div >
28
+ < div class ="viewport-group ">
29
+ < h2 class ="viewport-group-tilte "> 1st list</ h2 >
30
+
31
+ < div class ="info ">
32
+ < span ng-hide ="!firstListAdapter.isLoading "> ...data loading...</ span >
33
+ < span ng-hide ="isLoadingOnScope "> 1st list is loaded</ span >
34
+ </ div >
35
+
36
+ < div class ="actions ">
37
+ < button class ="btn btn-default " ng-click ="updateList1() "> update this list</ button >
38
+ < button class ="btn btn-default " ng-click ="addToList1() "> add new 3d item</ button >
39
+ < button class ="btn btn-default " ng-click ="removeFromList1() "> remove even items</ button >
40
+ </ div >
41
+
42
+ < div ui-scroll-viewport class ="viewport viewport-height-fixed " id ="viewport-adapter1 ">
43
+ < div class ="item " ui-scroll ="item in datasource "
44
+ adapter ="firstListAdapter "
45
+ is-loading ="isLoadingOnScope "
46
+ buffer-size ='5 '> {{item.content}}</ div >
47
+ </ div >
51
48
</ div >
52
- </ div >
53
-
54
49
50
+ < hr >
55
51
56
- < hr >
52
+ < div class ="viewport-group ">
53
+ < h2 class ="viewport-group-tilte "> 2st list</ h2 >
57
54
58
- < div class ="viewport-group ">
59
- < h2 class ="viewport-group-tilte "> 2st list</ h2 >
55
+ < div class ="info ">
56
+ < span ng-hide ="!second.list.adapter.isLoading "> ...data loading...</ span >
57
+ < span ng-hide ="second.list.adapter.isLoading "> 2nd list is loaded</ span >
58
+ </ div >
60
59
61
- < div class ="info ">
62
- < span ng-hide ="!second.list.adapter.isLoading "> ...data loading...</ span >
63
- < span ng-hide ="second.list.adapter.isLoading "> 2nd list is loaded</ span >
64
- </ div >
60
+ < div class ="actions ">
61
+ < button class ="btn btn-default " ng-click ="updateList2() "> update this list</ button >
62
+ < button class ="btn btn-default " ng-click ="addToList2() "> add new 5th item</ button >
63
+ < button class ="btn btn-default " ng-click ="removeFromList2() "> remove odd items</ button >
64
+ </ div >
65
65
66
- < div class ="actions ">
67
- < button class ="btn btn-default " ng-click =" updateList2() " > update this list </ button >
68
- < button class =" btn btn-default " ng-click =" addToList2() " > add new 5th item </ button >
69
- < button class =" btn btn-default " ng-click =" removeFromList2() " > remove odd items </ button >
70
- </ div >
66
+ < div ui-scroll-viewport class ="viewport viewport-height-fixed " id =" viewport-adapter2 ">
67
+ < div class ="item " ui-scroll =" item in datasource "
68
+ adapter =" second.list.adapter "
69
+ buffer-size =' 5 ' > {{item.content}} </ div >
70
+ </ div >
71
71
72
- < div ui-scroll-viewport class ="viewport viewport-height-fixed " id ="viewport-adapter2 ">
73
- < div class ="item " ui-scroll ="item in datasource "
74
- adapter ="second.list.adapter "
75
- buffer-size ='5 '> {{item.content}}</ div >
76
72
</ div >
77
73
78
74
</ div >
79
-
80
-
81
- </ div >
82
-
83
-
84
75
</ body >
85
76
</ html >
0 commit comments