FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
ionic/test/html/checkbox-watch.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
/
checkbox-watch.html
Copy path
More file actions
More file actions
Latest commit
History
History
History
50 lines (42 loc) · 1.42 KB
Breadcrumbs
ionic
/
test
/
html
/
checkbox-watch.html
Copy path
File metadata and controls
50 lines (42 loc) · 1.42 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
<!DOCTYPE html
>
<
html
>
<
head
>
<
meta
charset
="
utf-8
"
>
<
meta
name
="
viewport
"
content
="
initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width
"
>
<
link
href
="
/dist/css/ionic.min.css
"
rel
="
stylesheet
"
>
<
script
src
="
/dist/js/ionic.bundle.js
"
>
</
script
>
</
head
>
<
body
ng-app
="
app
"
>
<
ion-pane
>
<
ion-header-bar
class
="
bar-stable
"
>
<
h1
class
="
title
"
>
Awesome App
</
h1
>
</
ion-header-bar
>
<
ion-content
>
<
ion-checkbox
ng-model
="
test
"
>
test -- {{test}}
</
ion-checkbox
>
<
br
>
<
ion-checkbox
ng-model
="
nested.test
"
>
nested.test - {{nested.test}}
</
ion-checkbox
>
<
hr
>
<
div
ng-repeat
="
msg in log track by $index
"
>
{{msg}}
</
div
>
</
ion-content
>
</
ion-pane
>
</
body
>
<
script
>
angular
.
module
(
'app'
,
[
'ionic'
]
)
.
run
(
function
(
$rootScope
,
$interval
)
{
$rootScope
.
log
=
[
]
;
$rootScope
.
test
=
true
;
$rootScope
.
nested
=
{
test
:
true
}
;
$rootScope
.
$watch
(
'test'
,
function
(
)
{
$rootScope
.
log
.
push
(
'test watch'
)
;
}
)
;
$rootScope
.
$watch
(
'nested.test'
,
function
(
)
{
$rootScope
.
log
.
push
(
'nested.test watch'
)
;
}
)
;
$interval
(
function
(
)
{
//$rootScope.test = ! $rootScope.test;
//console.log("Value of $rootScope.test is: ", $rootScope.test);
//console.log("Value of $rootScope.nested.test is: ", $rootScope.nested.test);
}
,
500
)
;
}
)
;
</
script
>
</
html
>
Back
|
FazBrowse Home
|
New Git URL