簡體   English   中英

向帶有Bower-rails的rails中添加angular-datepicker

[英]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

請檢出https://github.com/rharriso/bower-rails/issues/37

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM