나는 angularjs를 처음 사용합니다. 나는 레일 (angularjs-rails) 젬을 사용하여 angularjs를 시도하고있다. ngAnimate를 사용하는 데 문제가 있습니다. 기능이 잘 작동합니다. 즉, 각도가 제대로 설치되어 있고 "addEntry"함수가 새 항목을 추가하지만 애니메이션이 작동하지 않습니다. 내가 여기서 무엇을 놓치고 있는지 잘 모르겠습니다. 여기angularjs : ngAnimate not working
<div ng-controller="MainCtrl">
<button ng-click="addEntry()"></button>
<div ng-repeat="entry in entries" ng-animate="'demo'">
<a>{{entry.name}}</a>
</div>
</div>
CSS는 ngAnimate을 지원하는 것입니다 : 여기
app = angular.module("MyApp", ['ngAnimate'])
@MainCtrl = ($scope) ->
$scope.entries = [{name: "Dummy1"}, {name: "Dummy2"}]
$scope.addEntry = ->
$scope.entries.push({name: "Dummy3"})
은 HTML 파일입니다
당신은 설치 클래스에서 0으로 페이드 애니메이션 설정 불투명도를 원하는 경우
.demo-enter {
-webkit-transition: all 1s linear;
transition: all 1s linear;
background: #000;
}
.demo-enter.demo-enter-active {
background: #ccc;
}
AngularJS 버전? – tasseKATT
AngularJS v1.2.14 – Siddhant