如何使用SASS处理Backbone.js所需的“#”

时间:2013-04-08 15:48:50

标签: backbone.js sass compass-sass

我正在尝试使用SASS和罗盘来制作图像灵魂。但是,我也使用backbone.js,所以我的网址看起来像:http://localhost/social/#/dashboard

因此,当我使用@include arrow-sprite($name);时,它会给我一个网址:http://localhost/social/#/images/sidebar_buttons/arrow-sa2b2afd371.png

哪个chrome检查员向我发出此错误:Resource interpreted as Image but transferred with MIME type text/html

如果我从网址中删除“#”,则图片会正常加载。我的config.rb看起来像:

http_path = "/social/"
project_path = "C:/wamp/social"
css_dir = "styles/css"
sass_dir = "styles/sass"
images_dir = "images"
javascripts_dir = "js"

1 个答案:

答案 0 :(得分:0)

在config.rb中启用相关资产:

relative_assets = true