[英]Module 'flow' not available in angularjs app
在我的app.js中,我包括了流程的依賴項
var myApp = angular.module('myApp',['ui.router', 'ngResource', 'flow']);
我已經在索引文件中包含了javascript以進行如下加載
<script type="text/javascript" src="//cdn.jsdelivr.net/flow.js/2.0.0b2/flow.js"></script>
我收到錯誤模塊“流”不可用!
Uncaught Error: [$injector:modulerr] Failed to instantiate module myApp due to:
Error: [$injector:modulerr] Failed to instantiate module flow due to:
Error: [$injector:nomod] Module 'flow' 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.
http://errors.angularjs.org/1.2.23/$injector/nomod?p0=flow
這可能是因為如果要在angularJs中使用['flow']模塊,則必須同時包含:flow.js和ng-flow。 如果您使用的是Bower,並且將Bower配置為將庫放置在js / vendor上,則必須執行以下操作。
bower install "ng-flow#~2" --save
{{ HTML::script('js/vendor/flow.js/dist/flow.min.js') }}
{{ HTML::script('js/vendor/ng-flow/dist/ng-flow.min.js') }}
如果不是,則只需查找ng-flow CDN。
最好的祝福!
您需要在CDN之前添加http:
將您的腳本更改為此,它應該可以工作:
<script type="text/javascript" src="http://cdn.jsdelivr.net/flow.js/2.0.0b2/flow.js"></script>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.