2016-06-27 44 views
0

我包含新模塊ezfb,收到錯誤「Failed實例化模塊「。

我跟着這個插件 - http://plnkr.co/edit/UMUtFc?p=preview

app.js

var app = angular.module('myApp', ['ezfb', 'ui.router', 'ngStorage', 'ngCookies', 'ngDialog', 'ngAnimate', 'treasure-overlay-spinner', 'satellizer']); 
    app.config(['$stateProvider', '$urlRouterProvider', '$locationProvider', '$httpProvider', '$authProvider', '$provide','ezfb', 
    function($stateProvider, $urlRouterProvider, $locationProvider, $httpProvider, $authProvider, $provide, ezfbProvider) { 

    ezfbProvider.setInitParams({ 
      appId : '386469651480295' 
     }); 

    }]); 

的Index.html

<!DOCTYPE html> 
<html lang="en"> 
    <head> 
     <meta charset="utf-8"> 
     <meta http-equiv="X-UA-Compatible" content="IE=edge"> 
     <meta name="viewport" content="width=device-width, initial-scale=1"> 
     <title>Myapps</title> 
     <!-- Bootstrap --> 
<body class="nav-md" ng-app="myApp"> 

     <div ui-view></div> 
     <script src="vendor/angular/angular.js"></script> 
     <script src="vendor/bootstrap/dist/js/bootstrap.js"></script> 
     <script src="vendor/angular-resource/angular-resource.js"></script> 
     <script src="vendor/files/angular-route.js"></script> 
     <script src="vendor/angular-ui-router/release/angular-ui-router.js"></script> 
     <script src="vendor/ngstorage/ngStorage.js"></script> 
     <!-- end angular theme --> 
     <script src="js/app.js"></script> 
     <script src="js/plugins/angular-easyfb.js"></script> 
     <script src="js/controllers/login_controller.js"></script> 

    </body> 
</html> 
+0

是文件js/plugins/angular-easyfb.js目前在這個位置? –

回答

0

應該在文件排序的問題。請如下更換這些文件

<script src="js/plugins/angular-easyfb.js"></script> 
<script src="js/app.js"></script> 
+0

我現在嘗試,但得到相同的錯誤。由於: 未能實例化模塊myApp錯誤:[$ injector:unpr] http://errors.angularjs.org/1.5.5/$injector/unpr?p0=ezfb – RSKMR

相關問題