Profiscience / knockout-contrib

:metal: KnockoutJS Goodies Monorepo
Do What The F*ck You Want To Public License
41 stars 6 forks source link

Help: How to run the router examples? #85

Open carlosagsmendes opened 6 years ago

carlosagsmendes commented 6 years ago

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 commented 6 years ago

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

carlosagsmendes commented 6 years ago

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 commented 6 years ago

@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'
})

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

CodeSandBox example

Thanks again

caseyWebb commented 6 years ago

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 commented 6 years ago

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