2014-12-02 75 views
2

我在模塊中添加了一個額外的依賴項後,整個事情只是在瀏覽器中崩潰(無法執行任何操作)。添加依賴項後瀏覽器崩潰

Error: [$injector:modulerr] Failed to instantiate module myAppRename due to: 
[$injector:modulerr] Failed to instantiate module myAppRename.view2 due to: 
[$injector:modulerr] Failed to instantiate module ngMessages due to: 
[$injector:nomod] Module 'ngMessages' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument  

這是加入NG-消息給我的模塊後,但現在看來似乎是一個普遍問題,各種依賴關係。

這是我的模塊的樣子:

angular.module('myAppRename.view2', ['ngRoute', 'ngMessages'])  

我到底錯在這裏做什麼?

+0

你包括腳本?角messages.js? – cbass 2014-12-02 21:30:10

+0

可以請你給你的app.js中的整個代碼? – GeekOnGadgets 2014-12-02 22:43:51

回答

4

我碰到了同樣的問題和錯誤是,我忘了角的消息腳本添加到我的網站:

<script type="text/javascript" src="/js/lib/angular/1.3.9/angular-messages.min.js"></script>