简体   繁体   中英

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?

eg - https://github.com/g00fy-/angular-datepicker , https://angular-ui.github.io/angular-google-maps/#!/

To my Bowerfile I have added

asset 'angular-datepicker', github: "g00fy-/angular-datepicker"

and run 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).

But when I add the path to my application.js file, it claims not to be able to find the file.

//= require angular-datepicker

I've already added the path to the bower_components to my application.rb file

config.assets.paths << Rails.root.join('vendor', 'assets', 'bower_components')

How can I add these bower libraries to rails?

Seems like you have to //= require angular-datepicker/angular-datepicker

Please checkout https://github.com/rharriso/bower-rails/issues/37 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM