我包含了新模块ezfb收到错误"无法实例化模块"。
我关注了这个插件 - 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 :(得分:0)
这应该是文件排序中的问题。请按以下方式交换这些文件
<script src="js/plugins/angular-easyfb.js"></script>
<script src="js/app.js"></script>