I have an div in which I show some data:
div.movie_details
div.movie_details_container
span {{ movieDetail.title }}
span {{ movieDetail.overview }}
I also have a button that changes the information that's been displayed:
ng-click="toggleRow(movie)
The toggleRow function:
$scope.toggleRow = function(movie){
$scope.movieDetail = movie;
};
So when a user clicks on the button the toggleRow function fires and sends the movie object as a parameter to the function. The function then changes the scope which changes the information displayed in the view. Works fine.
My problem is that I want to make a transition animation when the information in the div.movie_details_container changes. But I can't figure the correct order of actions.
I made a plunkr with a simplified version of the project: https://plnkr.co/edit/wlmVaxVhax0b07cvXXld?p=preview So when the user clicks on a title the change is very abrupt. I would like a nice fade in/out transition.