添加应用程序名称时角度模块配置中断

时间:2016-07-15 19:15:04

标签: javascript angularjs config

我正在设置'angular-oauth2'模块的配置,当我运行时

angular.module('', ['angular-oauth2'])
    .config(['OAuthProvider', function(OAuthProvider) {
        OAuthProvider.configure({
            baseUrl: '/api/v1',
            clientId: null,
            clientSecret: null // optional
        });
    }]);

我的服务器运行正常,一切都很好,当我添加应用程序的名称('fuse')时它会中断:

angular.module('fuse', ['angular-oauth2'])
    .config(['OAuthProvider', function(OAuthProvider) {
        OAuthProvider.configure({
            baseUrl: '/api/v1',
            clientId: null,
            clientSecret: null // optional
        });
    }]);

我在控制台中收到此错误:

angular.js:38 Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.5.5/$injector/modulerr?p0=fuse&p1=Error%3A%20…ogleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.5.5%2Fangular.min.js%3A43%3A246)

我看过html并且看得很低,并且应用程序的名称是'fuse',所以这个错误是什么?

<html>
<head>
    <base href="/app/">
    <meta charset="utf-8">
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title></title>

    <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/angular_material/0.11.2/angular-material.min.css">
    <link rel="stylesheet" href="build/fuse.css" >

    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">

    <script src="//ajax.googleapis.com/ajax/libs/jquery/2.2.3/jquery.min.js"></script>
    <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js"></script>
    <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular-animate.js"></script>
    <script src="//ajax.googleapis.com/ajax/libs/angular_material/1.0.7/angular-material.min.js"></script>
    <script src="build/fuse.js"></script>

</head>

<!--[if lt IE 10]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade
    your browser</a> to improve your experience.</p>
<![endif]-->

<body ng-app="fuse" md-theme="default" md-theme-watch
      class="{{state.current.bodyClass || ''}}">

<!-- SPLASH SCREEN -->
<ms-splash-screen id="splash-screen" >
    <div class="center">
        <div class="logo">
            <span></span>
        </div>
        <!-- Material Design Spinner -->
        <div class="spinner-wrapper">
            <div class="spinner">
                <div class="inner">
                    <div class="gap"></div>
                    <div class="left">
                        <div class="half-circle"></div>
                    </div>
                    <div class="right">
                        <div class="half-circle"></div>
                    </div>
                </div>
            </div>
        </div>
        <!-- / Material Design Spinner -->
    </div>
</ms-splash-screen>
<!-- / SPLASH SCREEN -->

<div id="main" class="animate-slide-up scrollable" ui-view="main" layout="column" ></div>

<floating-app-version></floating-app-version>

<!--<link href="build/styles.css" type="text/css" rel="stylesheet" />-->

<script src="build/common.js"></script>

<script src="build/vendor.js"></script>

<script src="/assets/app_config.js"></script>

<link rel="stylesheet" href="build/app.css" lazyload>
<script src="build/app.js"></script>

<script src="build/style.js"></script>

</body>

</html>

0 个答案:

没有答案