javascript clientside routing/pathing library [closed]

自作多情 提交于 2019-11-27 21:49:47

问题


I'm in the need for a routing library to handle my paths for a client side js app.

I'm currently using backbone.js, which while great, is not fully featured enough.

I'm looking for a dedicated pathing library that I can replace backbone with (only in terms of pathing, still want to use that for MVC), something with a lot of features.

Thanks


回答1:


There are a number of interesting routing libraries at http://www.microjs.com/#spa

Backbone, and Crossroads (and its accompanying library, Hasher) are both listed there, but you should also check out Director (independent module from the Flatiron framework) and LeviRoutes -- haven't used either but they look pretty promising.




回答2:


Not sure what sort of features you are looking for, but I just put up an extremely lightweight JS router that offers the bare minimum to get things going. A lot of the routers I had come across were offering way more features than I was looking for, so I thought this might help fill a void for those looking for something light:

https://github.com/bpeacock/lennonjs




回答3:


Also Finch.js seems good




回答4:


You may want to Try Sammy.js as well




回答5:


As the author I'm slightly biased but you could try http://davisjs.com It is a routing library that is based around pushState, although you can use hash based routing, or any thing else via extensions.

I'm not sure what features exactly that you want but Davis is full-featured, and gives you hooks into the internals so you can modify its behaviour anyway you want.



来源:https://stackoverflow.com/questions/6566360/javascript-clientside-routing-pathing-library

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!