File tree 2 files changed +17
-8
lines changed
platform/nativescript/plugins 2 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,11 @@ export default {
11
11
return topmost ( ) . goBack ( )
12
12
}
13
13
14
- Vue . navigateTo = Vue . prototype . $navigateTo = function ( component , options ) {
14
+ Vue . navigateTo = Vue . prototype . $navigateTo = function (
15
+ component ,
16
+ options ,
17
+ pageCb = ( ) => { }
18
+ ) {
15
19
return new Promise ( resolve => {
16
20
const placeholder = Vue . $document . createComment ( 'placeholder' )
17
21
@@ -30,6 +34,8 @@ export default {
30
34
const frame = topmost ( )
31
35
const navigate = frame ? frame . navigate : start
32
36
37
+ pageCb ( toPage )
38
+
33
39
navigate . call (
34
40
frame ,
35
41
Object . assign (
Original file line number Diff line number Diff line change @@ -107,13 +107,16 @@ export default {
107
107
108
108
const initial = router . getMatchedComponents ( ) [ 0 ]
109
109
110
- this . $navigateTo ( initial , {
111
- context : { router } ,
112
- clearHistory : true
113
- } ) . then ( page => {
114
- // Todo: this callback never fires on iOS and causes an issue
115
- router . pageStack . push ( page )
116
- } )
110
+ this . $navigateTo (
111
+ initial ,
112
+ {
113
+ context : { router } ,
114
+ clearHistory : true
115
+ } ,
116
+ page => {
117
+ router . pageStack . push ( page )
118
+ }
119
+ )
117
120
}
118
121
}
119
122
} )
You can’t perform that action at this time.
0 commit comments