Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

angular ng class with animation

<body [ngClass]="{'short': condition, 'long': !condition }">
  ...
</body>

.short {
  background-color: blue;
  transition: all 0.5s 0s ease-in;
}
.long {
  background-color: red;
  transition: all 1s 0s ease-in;
}
 
PREVIOUS NEXT
Tagged: #angular #ng #class #animation
ADD COMMENT
Topic
Name
7+1 =