角度模块不加载

时间:2016-03-29 19:30:33

标签: javascript angularjs ui.bootstrap angular-module

我坚持了一段时间。除了' ngRoute'之外,我无法加载任何模块。在我的angular.module命令...

当我尝试添加' angular-animate'它没有加载html页面,它只是显示白页...如果我只是' ngRoute'它工作得很好.....我在这里添加了代码

Catalogcontroller.js

var catalogapp = angular.module('catalogapp', ['ngRoute']);

catalogapp.config([function ($routeProvider) {
    $routeProvider
                .when('/msg/:message', {
        templateUrl: '/partials/msg.html',
        controller: 'msgcontroller'
    })
            .when('/series', {
        templateUrl: '/partials/series.html',
        controller: 'seriescontroller'
        })
            .when('/seasons/:seriesId', {
        templateUrl: '/partials/seasons.html',
        controller: 'seasoncontroller',
        })

            .when('/programs/:seasonId', {
                templateUrl: '/partials/programs.html',
                controller: 'programcontroller'
        })
            .when('/programversion/:programId', {
                templateUrl: '/partials/programversion.html',
                controller: 'programversioncontroller'
    })
}]);
catalogapp.controller('indexcontroller', function ($scope, $routeParams) {
    $scope.message = 'This is Index';
    //This makes call to the module catalogapp
    catalogapp.config(function ($routeProvider) { });
});

index.html代码在这里

<html ng-app="catalogapp">
<head>
    <title>Console UI</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.9/angular.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.9/angular-animate.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.9/angular-touch.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.9/angular-route.js"></script>
<link href="//netdna.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="/stylesheets/main.css">
  <script src="/controllers/catalogController.js"></script>
    <script src="/controllers/seriescontroller.js"></script>
    <script src="/controllers/seasoncontroller.js"></script>
    <script src="/controllers/programcontroller.js"></script>
    <script src="/controllers/programversioncontroller.js"></script>

</head>
<body ng-controller="indexcontroller">

我正在尝试添加&#39; ui.bootstrap&#39;到我的项目的依赖https://angular-ui.github.io/bootstrap/

任何人都可以帮助我们!感谢

如果您需要更多信息,请询问!

0 个答案:

没有答案