AngularJS:app.js(RouteProvider)抛出“未捕获的对象”

时间:2014-07-08 21:26:01

标签: angularjs

我认为我已将问题缩小到$ routeProvider,因为我有24条路线并且正在获取" Uncaught Object"错误24次,我把它减少到1路,而没有只有1"未捕获的对象。"错误消息并未提供其名称的更多信息。

这是我的app.js:

var appARM = angular.module('appARM', ['ngRoute', 'ui.bootstrap', 'ui.utils']);

appARM.config(function($routeProvider){
   $routeProvider
      .when('/', {
          controller: 'MainController',
          templateUrl: '/ang/views/landing.html'
      }).otherwise({ redirectTo: '/' });
});

有没有人看到任何会导致" Uncaught Object"错误?

提前致谢!

~~~ UPDATE ~~~ 这是角度母版页:

<!DOCTYPE html>
<html lang="en" data-ng-app="appARM">
<head>
    <meta charset="utf-8">
    <title>XXXX</title>
    <meta name="description" content="">
    <meta name="author" content="Jonathan Gravois">

    <!-- Mobile Specific Meta -->
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

    <!-- Stylesheets -->
    <link rel="stylesheet" href="/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="/css/appng.css"/>

    <!-- JAVASCRIPT -->
    <script type="text/javascript" src="/scripts/jquery.min.js"></script>
    <script type="text/javascript" src="/scripts/angular.js"></script>
    <script type="text/javascript" src="/scripts/angular-route.js"></script>
    <script type="text/javascript" src="/scripts/ui-bootstrap-0.11.0.min.js"></script>
    <script type="text/javascript" src="/scripts/ui-utils.min.js"></script>
    <script type="text/javascript" src="/ang/app.js"></script>
    <script type="text/javascript" src="/ang/controllers/main.js"></script>
    <script type="text/javascript" src="/ang/controllers/mainApp.js"></script>
    <script type="text/javascript" src="/ang/controllers/newApp.js"></script>
    <script type="text/javascript" src="/ang/controllers/editApp.js"></script>
    <script type="text/javascript" src="/ang/controllers/users.js"></script>
    <script type="text/javascript" src="/ang/controllers/farmers.js"></script>
    <script type="text/javascript" src="/ang/controllers/locations.js"></script>
    <script type="text/javascript" src="/ang/services/usersFactory.js"></script>
    <script type="text/javascript" src="/ang/services/applicationsFactory.js"></script>
    <script type="text/javascript" src="/ang/services/appFilters.js"></script>
    <!-- JAVASCRIPT -->

    <link rel="apple-touch-icon" sizes="57x57" href="/apple-touch-icon-57x57.png">
    <link rel="apple-touch-icon" sizes="114x114" href="/apple-touch-icon-114x114.png">
    <link rel="apple-touch-icon" sizes="72x72" href="/apple-touch-icon-72x72.png">
    <link rel="apple-touch-icon" sizes="144x144" href="/apple-touch-icon-144x144.png">
    <link rel="apple-touch-icon" sizes="60x60" href="/apple-touch-icon-60x60.png">
    <link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-120x120.png">
    <link rel="apple-touch-icon" sizes="76x76" href="/apple-touch-icon-76x76.png">
    <link rel="apple-touch-icon" sizes="152x152" href="/apple-touch-icon-152x152.png">
    <link rel="icon" type="image/png" href="/favicon-196x196.png" sizes="196x196">
    <link rel="icon" type="image/png" href="/favicon-160x160.png" sizes="160x160">
    <link rel="icon" type="image/png" href="/favicon-96x96.png" sizes="96x96">
    <link rel="icon" type="image/png" href="/favicon-16x16.png" sizes="16x16">
    <link rel="icon" type="image/png" href="/favicon-32x32.png" sizes="32x32">
</head>
<body>
    <div>
        <div data-ng-controller="MainController">
            <div id="full_page">
                <div id="main_container" style="min-height:800px;">
                    <div data-ng-include="'ang/views/partials/logobar.html'"></div>
                    <div data-ng-view></div>
                </div> <!-- end #main_container -->
            </div> <!-- end #full_page -->
        </div> <!-- end #main_container -->
    </div>
</body>
</html>

0 个答案:

没有答案