原文:http://www.luacloud.com/2016/ionic%E4%B8%ADionicview%E7%9A%84%E6%89%A7%E8%A1%8C%E9%A1%BA%E5%BA%8F.html
1
2
3
4
5
6
7
8
|
$
ionicView
.
loaded
$
ionicView
.
beforeEnter
$
ionicView
.
enter
$
ionicView
.
afterEnter
$
ionicView
.
beforeLeave
$
ionicView
.
leave
$
ionicView
.
afterLeave
$
ionicView
.
unloaded
|
代码
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
|
$
scope
.
$
on
(
'$ionicView.loaded'
,
function
(
)
{
console
.
log
(
"$ionicView.loaded"
)
;
}
)
;
$
scope
.
$
on
(
'$ionicView.beforeEnter'
,
function
(
)
{
console
.
log
(
"$ionicView.beforeEnter"
)
;
}
)
;
$
scope
.
$
on
(
"$ionicView.enter"
,
function
(
)
{
console
.
log
(
"$ionicView.enter"
)
;
}
)
;
$
scope
.
$
on
(
'$ionicView.afterEnter'
,
function
(
)
{
console
.
log
(
"$ionicView.afterEnter"
)
;
}
)
;
$
scope
.
$
on
(
'$ionicView.beforeLeave'
,
function
(
)
{
console
.
log
(
"$ionicView.beforeLeave"
)
;
}
)
;
$
scope
.
$
on
(
'$ionicView.leave'
,
function
(
)
{
console
.
log
(
"$ionicView.leave"
)
;
}
)
;
$
scope
.
$
on
(
'$ionicView.afterLeave'
,
function
(
)
{
console
.
log
(
"$ionicView.afterLeave"
)
;
}
)
;
$
scope
.
$
on
(
'$ionicView.unloaded'
,
function
(
)
{
console
.
log
(
"$ionicView.unloaded"
)
;
}
)
;
|