Backbone supplies structure to JavaScript-heavy applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing application over a RESTful JSON interface.
leeyupeng

js模板过于集中的问题

  •  
  •   leeyupeng · Oct 21, 2011 · 9270 views
    This topic created in 5499 days ago, the information mentioned may be changed or developed.
    最近在用backbone改一个后台管理(web端用的django),结果导致很多的js模板,类似<script type="text/template" id="xxx">之类的都放到了同一个.html里,但对于每个不同的router来说,不是所有的模板都需要,这样页面加载完后其实多了很多无用的js模板。

    不知道这是不是单页应用的固有问题,还是说有别的解决方法?
    5 replies  •  1970-01-01 08:00:00 +08:00
    stranbird
    stranbird
    Oct 21, 2011
    1
    看看Jammit
    leeyupeng
    leeyupeng
    OP
    Oct 21, 2011
    2
    @stranbird 多谢!!!根据你的提示我找到了这个: https://github.com/marlun/django-djammit
    lainuo
    lainuo
    Oct 22, 2011
    3
    没办法吧...Jammit好像是用来管理打包的吧...

    放HTML里看着不舒服的话, 扔JS里压掉就不碍眼了...
    panlilu
    panlilu
    Oct 22, 2011
    4
    有没有不需要django的类似的包管理库?
    AntiGameZ
    AntiGameZ
    Oct 22, 2011
    5
    @panlilu ender?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1605 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 16:26 · PVG 00:26 · LAX 08:26 · JFK 11:26
    ♥ Do have faith in what you're doing.