File tree 2 files changed +60
-0
lines changed
2 files changed +60
-0
lines changed Original file line number Diff line number Diff line change
1
+ const Vue = require ( 'nativescript-vue' )
2
+ const application = require ( 'tns-core-modules/application' )
3
+ const platform = require ( 'tns-core-modules/platform' )
4
+
5
+ Vue . config . silent = false
6
+ Vue . config . debug = true
7
+
8
+ import Home from './components/Home'
9
+
10
+ new Vue ( {
11
+ components : {
12
+ Home
13
+ } ,
14
+ render : h => h ( 'frame' , [ h ( Home ) ] )
15
+ } ) . $start ( )
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <Page >
3
+ <ActionBar class =" action-bar" title =" Home Page" >
4
+ </ActionBar >
5
+ <StackLayout >
6
+ <Button text =" Open page" @tap =" openPage" />
7
+ </StackLayout >
8
+ </Page >
9
+ </template >
10
+
11
+ <script >
12
+ const DetailsPage = {
13
+ template: `
14
+ <Page>
15
+ <ActionBar class="action-bar" title="Details Page">
16
+ <ActionItem text="Action"></ActionItem>
17
+ </ActionBar>
18
+ <StackLayout>
19
+ <Label :text="'Details ' + Math.random()" />
20
+ <Button text="another" @tap="openDetails" />
21
+ <Button text="back" @tap="goBack" />
22
+ </StackLayout>
23
+ </Page>
24
+ ` ,
25
+ methods: {
26
+ openDetails () {
27
+ this .$navigateTo (DetailsPage)
28
+ },
29
+ goBack () {
30
+ this .$navigateBack ()
31
+ }
32
+ }
33
+ }
34
+
35
+ export default {
36
+ components: [
37
+ DetailsPage,
38
+ ],
39
+ methods: {
40
+ openPage () {
41
+ this .$navigateTo (DetailsPage)
42
+ }
43
+ }
44
+ }
45
+ </script >
You can’t perform that action at this time.
0 commit comments