试图让angularstrap工作,但没有运气

时间:2014-06-07 17:30:19

标签: angularjs angularjs-directive angularjs-scope angular-ui angular-strap

我正试图让angularstrap工作,但还没有运气。这是我的角度代码

<!DOCTYPE html>
<head>
    <title>Learning AngularJS</title>
    <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.min.js"></script>
    <script src="//oss.maxcdn.com/angular.strap/2.0.0/angular-strap.min.js"></script>
    <script src="//oss.maxcdn.com/angular.strap/2.0.0/angular-strap.tpl.min.js"></script>
</head>
<body>
<div id='content' ng-app='MyTutorialApp' ng-controller='MainController'>
{{understand}}
</div>
<script>
    var app = angular.module('MyTutorialApp',['mgcrea.ngStrap']);
    app.controller("MainController", function($scope){
        $scope.understand = "I now understand how the scope works!";
    });
</script>
</body>
</html>

我收到此错误

Uncaught object ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.min.js:33

当我从

取出mgcrea.ngStrap时
var app = angular.module('MyTutorialApp',['mgcrea.ngStrap']);

然后它的工作原理。任何帮助将不胜感激!

Here is a snapshot of angular debugger for dependencies

1 个答案:

答案 0 :(得分:1)

angularstrap取决于角度动画..

包括这个  <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.10/angular-animate.min.js"></script> 这里已经回答:$injector:modulerr using angular-strap?

  

AngularStrap比以往更轻,更快,因为它可以利用它   来自AngularJS 1.2 +的ngAnimate的力量

https://github.com/mgcrea/angular-strap/issues/651