Skip to content

Commit 13192b0

Browse files
committed
feat(bootstrap): use the launch event instead of a navigation entry
1 parent f7e6126 commit 13192b0

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

platform/nativescript/runtime/index.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { start } from 'tns-core-modules/application'
1+
import { start, on, launchEvent } from 'tns-core-modules/application'
22
import { warn } from 'core/util/index'
33
import { patch } from './patch'
44
import { mountComponent } from 'core/instance/lifecycle'
@@ -60,17 +60,17 @@ Vue.prototype.$start = function() {
6060
let self = this
6161
const AppConstructor = Vue.extend(this.$options)
6262

63-
start({
64-
create() {
65-
if (self.$el) {
66-
self.$destroy()
67-
self = new AppConstructor()
68-
}
69-
70-
self.$mount()
71-
return ensurePage(self.$el, self)
63+
on(launchEvent, args => {
64+
if (self.$el) {
65+
self.$destroy()
66+
self = new AppConstructor()
7267
}
68+
69+
self.$mount()
70+
args.root = ensurePage(self.$el, self)
7371
})
72+
73+
start()
7474
}
7575

7676
export default Vue

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy