How to use the nativescript-vue.mode function in nativescript-vue

To help you get started, we’ve selected a few nativescript-vue examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nativescript-vue / nativescript-vue / samples / app / app-with-router-component.js View on Github external
}

const UserPosts = {
  template: `
    
      
        <label>
      </label>
    
  `
}

Vue.use(VueRouter)

const router = new VueRouter({
  mode: Vue.mode,
  routes: [
    { path: '/', component: HomePage },
    {
      path: '/user/:id',
      component: UserPage,
      children: [
        {
          // UserProfile will be rendered inside User's 
          // when /user/:id/profile is matched
          path: 'profile',
          component: UserProfile
        },
        {
          // UserPosts will be rendered inside User's 
          // when /user/:id/posts is matched
          path: 'posts',
github nativescript-vue / nativescript-vue / samples / app / app-with-ns-router.js View on Github external
<button>
      
  
`,
  methods: {
    login() {
      applicationSettings.setBoolean('isLoggedIn', true)
      this.$router.replace('/home')
    }
  }
}

Vue.use(VueRouter)

const router = new VueRouter({
  mode: Vue.mode,
  routes: [
    { path: '/', component: LoginSCN__LoadingPage },
    { path: '/home', component: LoginSCN__HomePage },
    { path: '/login', component: LoginSCN__LoginPage }
  ]
})

router.push('/')

new Vue({
  router,
  template: `
                 
             `
}).$start()
</button>