Skip to content
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

Routing settings #2

Open
ctomczyk opened this issue Nov 26, 2016 · 0 comments
Open

Routing settings #2

ctomczyk opened this issue Nov 26, 2016 · 0 comments

Comments

@ctomczyk
Copy link

Hi,

I've prepared a demo application: http://ctomczyk.pl/lab/ractive/src/ where I can't set properly routing in any way. I was following guidelines https://www.npmjs.com/package/ps-ractive-router. Here is what's happening:

  1. Activating "App Demo" logo should move user to home page, instead it's moving outside of app (to the root domain location). The <a> contains "/" and therefore it's moving outside, but if there will be "./" then it's fine as this points to the project root folder. How do I setup routing for project root location?

  2. Activating "test" link gives

ps-ractive-router.js:1257 Uncaught TypeError: Cannot read property 'pageName' of undefined (...) ps-ractive-router.js:1257

This looks like the module Test doesn't contains a name, but in fact it is defined in http://ctomczyk.pl/lab/ractive/src/js/components/test/testViewModel.js (componentSettings object). Any suggestions what's wrong there?

  1. I was expecting to run homePage module when the user lands on home page as it is defined in routing config: http://ctomczyk.pl/lab/ractive/src/js/config/routes.js. Instead nothing happens. Any suggestions what's wrong there?

  2. The header module (http://ctomczyk.pl/lab/ractive/src/js/components/header/headerViewModel.js) contains defined event handler for navToTest event, but seems it's not working while activating link "test". However, if I move it to setup function using this.on('navToTest', ...) then it works. Any suggestions why events can't be sets up using events property while initialising Ractive?

Thanks for the help.

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

No branches or pull requests

1 participant