FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
ionic/test/html/subControllers.html at master · Java1024/ionic · GitHub
Java1024
ionic
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
ionic
/
test
/
html
/
subControllers.html
Copy path
More file actions
More file actions
Latest commit
History
History
History
122 lines (111 loc) · 3.8 KB
Breadcrumbs
ionic
/
test
/
html
/
subControllers.html
Copy path
File metadata and controls
122 lines (111 loc) · 3.8 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<!DOCTYPE html
>
<
html
ng-app
="
sideMenuTest
"
>
<
head
>
<
meta
charset
="
utf-8
"
>
<
title
>
Sub Controllers
</
title
>
<!-- Sets initial viewport load and disables zooming -->
<
meta
name
="
viewport
"
content
="
initial-scale=1, maximum-scale=1, user-scalable=no
"
>
<
link
rel
="
stylesheet
"
href
="
../../../../dist/css/ionic.css
"
>
<
script
src
="
../../../../dist/js/ionic.bundle.js
"
>
</
script
>
</
head
>
<
body
>
<
ion-side-menus
>
<
ion-side-menu-content
>
<
header
class
="
bar bar-header bar-dark
"
>
<
a
href
="
#
"
class
="
button
"
>
<
i
class
="
icon-reorder
"
>
</
i
>
</
a
>
<
h1
class
="
title
"
>
Slide me
</
h1
>
</
header
>
<
div
class
="
content has-header
"
>
<
h1
>
Slide me side to side!
</
h1
>
</
div
>
</
ion-side-menu-content
>
<
ion-side-menu
side
="
left
"
>
<
h2
>
Left
</
h2
>
<
ul
class
="
list
"
>
<
a
href
="
#
"
class
="
list-item
"
ng-repeat
="
item in list
"
>
{{item.text}}
</
a
>
</
ul
>
</
ion-side-menu
>
<
ion-side-menu
side
="
right
"
>
<
ion-tabs
>
<
ion-tab
title
="
Home
"
icon
="
ion-home
"
class
="
tab-content
"
>
<
header
class
="
bar bar-header bar-dark
"
>
<
h1
class
="
title
"
>
Tab Bars
</
h1
>
</
header
>
<
ion-content
class
="
has-header has-tabs
"
>
<
h1
>
Home
</
h1
>
<
ul
class
="
list
"
>
<
a
href
="
#
"
class
="
list-item
"
ng-repeat
="
item in items
"
>
{{item.title}}
</
a
>
</
ul
>
</
ion-content
>
</
ion-tab
>
<
ion-tab
title
="
About
"
icon
="
ion-info
"
class
="
tab-content
"
>
<
header
class
="
bar bar-header bar-success
"
>
<
h1
class
="
title
"
>
About
</
h1
>
</
header
>
<
ion-content
class
="
has-header has-tabs
"
>
<
h1
>
About Us
</
h1
>
</
ion-content
>
</
ion-tab
>
<
ion-tab
title
="
Settings
"
icon
="
icon-gear
"
class
="
tab-content
"
>
<
header
class
="
bar bar-header bar-dark
"
>
<
h1
class
="
title
"
>
Settings
</
h1
>
</
header
>
<
ion-content
class
="
has-header has-tabs
"
>
<
h1
>
Settings
</
h1
>
</
ion-content
>
</
ion-tab
>
</
ion-tabs
>
</
ion-side-menu
>
</
ion-side-menus
>
<
script
>
angular
.
module
(
'sideMenuTest'
,
[
'ionic'
]
)
;
/*
var Controller = function(opts) {
var _this = this;
this.el = opts.el;
this.animateClass = opts.animateClass;
// Bind release and drag listeners
window.ionic.onGesture('drag', function(e) {
_this.onDrag && _this.onDrag(e);
}, this.el);
window.ionic.onGesture('release', function(e) {
_this.endDrag && _this._endDrag(e);
}, this.el);
};
Controller.prototype = {
onDrag: function(e) {},
endDrag: function(e) {},
getTranslateX: function() {
var r = /translate3d\((-?.+)px/;
var d = r.exec(this.el.style[ionic.CSS.TRANSFORM]);
if(d && d.length > 0) {
return parseFloat(d[1]);
}
return 0;
},
setTranslateX: function(amount) {
this.el.style[ionic.CSS.TRANSFORM] = 'translate3d(' + amount + 'px, 0, 0)';
},
enableAnimation: function() {
this.el.classList.add(this.animateClass);
},
disableAnimation: function() {
this.el.classList.remove(this.animateClass);
}
};
var l = new SideMenu({ el: document.getElementById('my-left-panel'), width: 270 });
var r = new SideMenu({ el: document.getElementById('my-right-panel'), width: 270 });
var c = new Controller({ el: document.createElement('content') });
var ctrl = new SideMenuController({
left: l,
right: r,
content: c
});
*/
</
script
>
</
body
>
</
html
>
Back
|
FazBrowse Home
|
New Git URL