簡體   English   中英

如何在Meteor-Angular應用程序中安裝Bower組件

[英]How to install bower component in Meteor-Angular application

我想在Meteor / AngularJS / Ionic應用程序中使用以下插件:

https://github.com/rajeshwarpatlolla/ionic-timepicker

它可以通過bower獲得,但是當我安裝它時,我的應用程序無法編譯(大概是因為它下載了依賴項, angularionic和其他一些要運行的程序,並且它們已經在我的應用程序中(使用Meteor的打包系統) )。 我還試圖忽略bower.json文件中的那些依賴項。

如果我嘗試僅將該src文件夾中的文件包括在內,則在打開我的應用程序時出現錯誤:

Error: [$injector:modulerr] Failed to instantiate module MyApp due to:
[$injector:modulerr] Failed to instantiate module ionic-timepicker due to:
[$injector:modulerr] Failed to instantiate module ionic-timepicker.templates due to:
[$injector:nomod] Module 'ionic-timepicker.templates' is not available!

有沒有辦法可以將此插件與Meteor / Angular一起使用?

您的錯誤與流星無關。 似乎您沒有在應用程序中包含該庫。

Bower僅搜索並下載您的庫,但不會將其導入您的項目。 使用腳本標記將您的file.js包括在bower_components文件夾中,並確保已添加下載的模塊以提高角度。

這就是該錯誤發生的主要原因。

暫無
暫無

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

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