[英]Adding angular-datepicker to rails with bower-rails
Bower-rails看起来应该是交钥匙的,并且适用于非常受欢迎的库(例如angular和angular-resource),但是如何添加另一个不那么流行但启用Bower的库呢?
例如-https: //github.com/g00fy-/angular-datepicker,https : //angular-ui.github.io/angular-google-maps/#!/
我在Bowerfile中添加了
asset 'angular-datepicker', github: "g00fy-/angular-datepicker"
并运行rake bower:install。 这会将文件与其他起作用的库(Angular,Angular-resource等)一起安装到我的vendor / assets / bower_components文件夹中。
但是,当我将路径添加到application.js文件时,它声称无法找到该文件。
//= require angular-datepicker
我已经将bower_components的路径添加到了application.rb文件中
config.assets.paths << Rails.root.join('vendor','assets','bower_components')
如何将这些Bower库添加到rails?
似乎您必须//= require angular-datepicker/angular-datepicker
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.