8000 Sample app for reproducing the #555 issue by msaelices · Pull Request #590 · nativescript-vue/nativescript-vue · GitHub
[go: up one dir, main page]

Skip to content

Sample app for reproducing the #555 issue #590

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions samples/app/555.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
const Vue = require('nativescript-vue')

Vue.config.debug = true
Vue.config.silent = false

new Vue({
data: {
foo: false
},
template: `
<Frame>
<Page>
<ActionBar title="Issue #555" />

<StackLayout>
<Label text="You should see now a greeting dialog" />
</StackLayout>
</Page>
</Frame>
`,
mounted() {
// this dialog is not shown because when the Vue mounted event
// is fired NS has not loaded all the UI components yet
// so for being able to use it change the <Page> tag to:
// <Page @loaded="greet"> instead of using the mounted event
this.greet()
},
methods: {
greet() {
alert('Hello!').then(() => {
console.log('Alert dialog closed.')
})
}
}
}).$start()
0