2015-12-21 115 views
1

我想用下面的插件在我的流星/ AngularJS /離子應用:如何流星角應用程序安裝涼亭組件

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

這是通過涼亭可用,但是當我安裝它與我的應用程序無法編譯(大概是因爲它下載依賴關係,angular,ionic,還有一些,運行,他們已經在我的應用程序(使用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! 

有沒有我可以使用這個插件與流星/角的方式?

回答

1

您的錯誤與角流星流體無關。看起來你並沒有將庫包含到你的應用程序中。

Bower只搜索您的圖書館並下載它,但不會將其導入到您的項目中。使用腳本標記來包含放置在bower_components文件夾中的file.js,並確保已添加您下載的模塊作爲角度的依賴。

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

+0

在流星中,你不想包含使用腳本標記。 – user2473015

+0

哦!這是流星角,我反過來就是角流星,相反。你在使用涼亭流星包嗎? – Serginho

+1

@謝謝。沒有意識到我必須使用涼亭流星包。安裝它,然後在依賴列表中包含ionic-timepicker並使其工作。 – ahota