[英]Adding angular-datepicker to rails with bower-rails
Bower-rails looks like it should be turn key, and is for very popular libraries like angular and angular-resource, but how can I add another less popular, but bower enabled, library? Bower-rails看起来应该是交钥匙的,并且适用于非常受欢迎的库(例如angular和angular-resource),但是如何添加另一个不那么流行但启用Bower的库呢?
eg - https://github.com/g00fy-/angular-datepicker , https://angular-ui.github.io/angular-google-maps/#!/ 例如-https: //github.com/g00fy-/angular-datepicker,https : //angular-ui.github.io/angular-google-maps/#!/
To my Bowerfile I have added 我在Bowerfile中添加了
asset 'angular-datepicker', github: "g00fy-/angular-datepicker"
and run rake bower:install. 并运行rake bower:install。 This installs the files to my vendor/assets/bower_components folder with the other libraries that do work (angular, angular-resource, etc). 这会将文件与其他起作用的库(Angular,Angular-resource等)一起安装到我的vendor / assets / bower_components文件夹中。
But when I add the path to my application.js file, it claims not to be able to find the file. 但是,当我将路径添加到application.js文件时,它声称无法找到该文件。
//= require angular-datepicker
I've already added the path to the bower_components to my application.rb file 我已经将bower_components的路径添加到了application.rb文件中
config.assets.paths << Rails.root.join('vendor', 'assets', 'bower_components') config.assets.paths << Rails.root.join('vendor','assets','bower_components')
How can I add these bower libraries to rails? 如何将这些Bower库添加到rails?
Seems like you have to //= require angular-datepicker/angular-datepicker
似乎您必须//= require angular-datepicker/angular-datepicker
Please checkout https://github.com/rharriso/bower-rails/issues/37 . 请检出https://github.com/rharriso/bower-rails/issues/37 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.