abelyao
V2EX  ›  问与答

有没有什么轻量级的前端路由框架可以推荐一下?最好能兼容低版本 IE 的

  •  1
     
  •   abelyao · Mar 11, 2015 · 2995 views
    This topic created in 4111 days ago, the information mentioned may be changed or developed.
    RT.
    就类似 Angular 中的 router 那种效果,点击页面上的 url 之后,页面上的局部 html 重新加载。
    第一目标是轻量级,因为要考虑移动网络;
    第二目标是能兼容到低版本的 IE,所以使用 History API 的就没戏了;
    如果需要后端配合的也可以,或者 url 中使用 # 的也接受。

    最近有些累,不想重复造轮子了,如果有看到过或者用过,麻烦推荐一下,谢谢 :)
    Supplement 1  ·  Mar 11, 2015
    发现一个 director 可以实现路由功能,但是仅仅是路由而已:
    https://github.com/flatiron/director
    2 replies    2015-03-11 11:48:31 +08:00
    icanfork
        1
    icanfork  
       Mar 11, 2015   ❤️ 1
    page.js //不过不知道兼不兼容低版本IE
    abelyao
        2
    abelyao  
    OP
       Mar 11, 2015
    @belin520 貌似很完善的样子,谢谢~
    看到它说 可以搭配 https://github.com/devote/HTML5-History-API 来兼容低版本的 IE
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   890 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 21:17 · PVG 05:17 · LAX 14:17 · JFK 17:17
    ♥ Do have faith in what you're doing.