Skip to content
This repository has been archived by the owner on Apr 29, 2021. It is now read-only.

cannot get/ #23

Open
dreyn74 opened this issue Feb 18, 2018 · 2 comments
Open

cannot get/ #23

dreyn74 opened this issue Feb 18, 2018 · 2 comments

Comments

@dreyn74
Copy link

dreyn74 commented Feb 18, 2018

Out of the box, the routing does not seem to work.

@dreyn74
Copy link
Author

dreyn74 commented Feb 19, 2018

I managed to get this template working by adding the "window" identifiers to these lines in main.js, but now there's this error: GET http://localhost:8080/cordova.js 404 (Not Found)

function handleBackButton () {
  // NOTE: The back button will behave differently depending on circumstance
  // If the side panel is open, close it
  if (document.querySelector('.panel-left.active')) {
    // This will do nothing when the split-view is open
    return window.f7.closePanel();
  }
  // Close modals
  // @TODO How to handle modals we shouldn't close like a login-screen?
  if (document.querySelector('.modal-in')) {
    return f7.closeModal();
  }
  // If we have a back button, we want it to go back
  if (f7.mainView.history.length > 1) {
    return f7.mainView.router.back();
  }
  // Default to closing the app
  return window.navigator.app.exitApp();
}
to
``` diff
function handleBackButton () {
  // NOTE: The back button will behave differently depending on circumstance
  // If the side panel is open, close it
  if (document.querySelector('.panel-left.active')) {
    // This will do nothing when the split-view is open
    return window.f7.closePanel();
  }
  // Close modals
  // @TODO How to handle modals we shouldn't close like a login-screen?
  if (document.querySelector('.modal-in')) {
    return +window.f7.closeModal();
  }
  // If we have a back button, we want it to go back
  if (+window.f7.mainView.history.length > 1) {
    return window.f7.mainView.router.back();
  }
  // Default to closing the app
  return window.navigator.app.exitApp();
}

@mansourcodes
Copy link

yes, Routing does not seem to work.
I add new route path but it's not working

import Tabs from './pages/Tabs.vue';
import About from './pages/About.vue';
import NotFoundPage from './pages/not-found.vue';

export default [
  {
    path: '/',
    component: Tabs
  },
  {
    path: '/about/',
    component: About
  },
  {
    path: '(.*)',
    component: NotFoundPage
  }
];

Page error:
Cannot GET /about/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants