visionmedia / page.js

Micro client-side router inspired by the Express router
http://visionmedia.github.com/page.js
7.67k stars 687 forks source link

Hard to learn, There's no example working #427

Closed onigetoc closed 6 years ago

onigetoc commented 6 years ago

Hard to learn how to use page.js, There's no example working.

Please do some update or i will have to move to another up to date navagation script.

paulocoghi commented 6 years ago

Page.js is not being maintained anymore, as detailed here https://github.com/visionmedia/page.js/issues/384

There are other (maintained) router options, like:

https://github.com/riot/route https://github.com/Rich-Harris/roadtrip

onigetoc commented 6 years ago

Hi, i'm sorry about that (not being maintained anymore) , it's was well done at first. I will try your suggestion Thank you. If you or someone have other routing scripts on Github i would be interested to check them all since i didn't find good one until now.

I'm looking for a simple href based route with Handlebars and NOT with node

paulocoghi commented 6 years ago

I'm looking for a simple href based route with Handlebars and NOT with node

Both of the options I passed to you work in the browser. :)

onigetoc commented 6 years ago

I do not like the fact that's is 100% javascript without html templating. it's look like react.js to hard for my brain to divide just javascript app.

paulocoghi commented 6 years ago

Page.js is not a front-end framework and, thus, you will not find html templating in it. Its mission is to exclusively handle the routing part.

onigetoc commented 6 years ago

I just find a interesting one with Riot Handlebars https://codepen.io/crisward/pen/xwGJpM?editors=101

paulocoghi commented 6 years ago

Glad you found a solution the way you wanted it :)

onigetoc commented 6 years ago

It get the same problem as page.js have, function do not work. {route:"/page4/:name",use:"myfunction"},

senica commented 6 years ago

This should not be in the page.js issues list as it is for another library. If you have an issue with another library post, in their github issues list.

In your example, you have your function specified in double quotes. The router will just try and call the string, which doesn't do anything. If you indeed have a function called myfunction, remove the quotes. As in the example you referenced to (https://codepen.io/crisward/pen/xwGJpM?editors=101).

If you are going to use the riot router, and you mentioned earlier you were interested in html templating, it would be worth looking at the riot project (http://riotjs.com/).

You can use page.js with riotjs. I am working on a project right now in which I use both riotjs and page.js. How you implement them depends greatly on your project, and each projet can vary slightly. Which is what is great about both libraries.

onigetoc commented 6 years ago

Hi saw the double quotes mistake: Ok, i think i understand based on the function logger https://codepen.io/onigetoc/pen/YExpWM?editors=1010

tomeraz commented 6 years ago

If the project is not maintained anymore, suggest you update the README.md on top. Think it's valuable info.

paulocoghi commented 6 years ago

@tomeraz , unfortunately, all the active members of the community doesn't have necessary permissions to update the README.

In other words, all members with write permission are no longer active with Page.js.

matthewp commented 6 years ago

Sounds like there isn't an issue here anymore. Closing.