"没有模块:appname"尝试加载角度页面时出错

时间:2014-10-11 14:23:50

标签: angularjs

当我加载页面时出现“No module:umt”错误,{{}}模板按原样显示。 为什么这不能按预期工作?

中将Html.HTML

<html ng-app="umt">
<head>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular.js"></script>
<script src="js/controllers.js"></script>
</head>
    <body ng-controller="umtc">
    <ul>
        <li ng-repeat="sponsor in sponsors">
            {{sponsor.name}}<p>{{sponsor.sponsorid}}</p>
        </li>
    </ul>
    </body>
</html>

JS / controllers.js

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

umt.controller('umtc',function($scope)
{
    $scope.sponsors = [{'sponsorid':'1','name':'hello'}];
}

0 个答案:

没有答案