Closed onigetoc closed 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
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
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. :)
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.
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.
I just find a interesting one with Riot Handlebars https://codepen.io/crisward/pen/xwGJpM?editors=101
Glad you found a solution the way you wanted it :)
It get the same problem as page.js have, function do not work. {route:"/page4/:name",use:"myfunction"},
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.
Hi saw the double quotes mistake: Ok, i think i understand based on the function logger https://codepen.io/onigetoc/pen/YExpWM?editors=1010
If the project is not maintained anymore, suggest you update the README.md on top. Think it's valuable info.
@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.
Sounds like there isn't an issue here anymore. Closing.
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.