我正在开发这个有角度的简单页面.我正在使用Bower来安装我需要的组件,并且应用程序过去非常有效.直到我决定利用Angular动画库.我第一次使用Bower问我应该使用哪个"合适的"Angular库:1.2.6(已经安装和工作)或1.2.14.
因此,如果我选择1.2.6,则在添加后立即出现错误
var mainApp = angular.module('myStopApp', [
'ngCookies',
'ngResource',
'ngSanitize',
'ngRoute',
'ngAnimate',
'myStopModule'
])
Run Code Online (Sandbox Code Playgroud)
是
未捕获错误:[$ injector:unpr]未知提供者:$$ asyncCallbackProvider < - $$ asyncCallback < - $ animate < - $ compile
如果我选择其他版本问题转移到代码,它似乎无法识别使用ng-class ..
我有一个ng-class ="testClass"元素和一个列表元素,我有:
ng-click="selectStop(stop); testClass='stop-active'"
Run Code Online (Sandbox Code Playgroud)
我在animations.css中的位置:
.stop-active-add, .stop-active-remove {
-webkit-transition:all linear 0.5s;
-moz-transition:all linear 0.5s;
-o-transition:all linear 0.5s;
transition:all linear 0.5s;
display:block!important;
}
.stop-active-add.add-active,
.stop-active-remove {
opacity:0;
}
.stop-active-add,
.stop-active-remove.-remove-active {
opacity:1;
}
Run Code Online (Sandbox Code Playgroud)
在加载页面时我有一个错误说:
[$parse:syntax] Syntax Error: Token '=' implies assignment but [selectStop(stop); testClass] can not be assigned to... …Run Code Online (Sandbox Code Playgroud)