<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>angular-animate</artifactId>
<version>1.8.2</version>
</dependency>
properties
spring.resources.static-locations=classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/
spring.web.resources.add-mappings=false
html
script
var app = angular.module('myApp', ['ngAnimate']);
app.controller('myCtrl', function($scope) {
$scope.showButton = true;
$scope.toggleAnimation = function() {
$scope.showButton = !$scope.showButton;
};
});
app.animation('.fade-animation', function() {
return {
enter: function(element, done) {
element.css('opacity', 0);
jQuery(element).animate({opacity: 1}, 1000, done);
},
leave: function(element, done) {
element.css('opacity', 1);
jQuery(element).animate({opacity: 0}, 1000, done);
}
};
});