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

Help: How to run the router examples? #85

Open
carlosagsmendes opened this issue May 17, 2018 · 5 comments
Open

Help: How to run the router examples? #85

carlosagsmendes opened this issue May 17, 2018 · 5 comments
Assignees
Labels
build Issues relating to the build process docs

Comments

@carlosagsmendes
Copy link
Contributor

Hi,

I would like to try out the new version of the router but I'm not being able to run the examples.

They are in Typescript and I can't find how I'm supposed to transpile it to run them.

Thanks in advance!

@caseyWebb caseyWebb added the docs label May 17, 2018
@caseyWebb caseyWebb self-assigned this May 17, 2018
@caseyWebb caseyWebb added the build Issues relating to the build process label May 17, 2018
@caseyWebb
Copy link
Contributor

@carlosagsmendes They are in a broken state right now from when I rewrote the build process. I need to revisit this.

@carlosagsmendes
Copy link
Contributor Author

Thank you. I tried removing the examples folder exclusion from typescript config and doing a build, but it didn't work.

By the way, we haven't checked your router for a while, and it is impressive how mature and polished it became!

@carlosagsmendes
Copy link
Contributor Author

@caseyWebb I've also tried to use some basic code from one of the examples.

Router.useRoutes({
  '/': (ctx) => ctx.redirect('/foo'),
  '/foo': 'foo',
  '/bar': 'bar'
})
  • Knockout bindings are being applied.
  • The redirect from / -> /foo works
  • But the foo component is not being loaded

Is the router broken or just something missing from the examples?

CodeSandBox example

Thanks again

@caseyWebb
Copy link
Contributor

This really looks like it should work. What is strange is that even trying to manually navigate to /router/foo in that sandbox isn't working.

@carlosagsmendes
Copy link
Contributor Author

My bad, it was a problem with the styles that I've copied from an example that was setting display to 'none'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues relating to the build process docs
Projects
None yet
Development

No branches or pull requests

2 participants