我的应用程序只是阅读我的application.css.scss样式表,我希望在应用程序中阅读其他样式表。 Haven之前没有遇到过这个问题。我尝试使用以下扩展名(.css.scss和.css)重命名其他样式表,并尝试了我的宝石的不同变体,但似乎没有任何效果。这是我目前的样式表:
application.css.scss
static_pages.scss
users.scss
的Gemfile:
gem 'pg', '0.17.1'
gem 'rails', '4.2.2'
gem 'puma', '3.4.0'
gem 'sass-rails', '4.0.3'
gem 'uglifier', '3.0.0'
gem 'coffee-rails', '4.1.0'
gem 'jquery-rails', '4.1.1'
gem 'turbolinks', '2.3.0'
gem 'jbuilder', '2.2.3'
gem 'bootstrap-sass', '3.2.0.0'
gem 'sdoc', '~> 0.4.0', group: :doc
gem 'devise'
gem 'devise_security_extension'
group :development, :test do
gem 'pg', '0.17.1'
gem 'byebug', '3.4.0'
gem 'web-console', '2.0.0.beta3'
gem 'spring', '1.1.3'
端
group :production do
gem 'pg', '0.17.1'
end
应用程序样式表:
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
* compiled file so the styles you add here take precedence over styles defined in any styles
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
* file per style scope.
*
*= require_tree .
*= require_self
*/
@import "bootstrap-sprockets";
@import "bootstrap"
;
答案 0 :(得分:1)
您的vm.getCountries = function () {
var q = $q.defer();
if (vm.countries === undefined) {
return $http({
method: 'POST',
cache: true,
url: API + '/api/Global/Countries',
}).then(function successCallback(response) {
if (errorHandler(response.data)) {
vm.countries = response.data;
q.resolve(response.data)
console.log("ajax")
}
});
} else {
console.log("cache")
q.resolve(vm.countries)
}
return q.promise;
}
文件看起来像是一个scss文件。
因此,您需要使用application
导入文件。
@import