kasperhj
kasperhj

Reputation: 10482

Animation in angular ui bootstrap alerts

Is it possible to add animations to the alerts provided by angular ui bootstrap? I am particularly interested in fading in an alert that lingers for a while before it automatically fades out again.

Upvotes: 0

Views: 2965

Answers (1)

Rob J
Rob J

Reputation: 6629

Sure, I created the following classes to do just that:

.alert.ng-hide-add,
.alert.ng-hide-remove {

    -moz-transition: 0.5s linear all;
    -o-transition: 0.5s linear all;
    -webkit-transition: 0.5s linear all;
    transition: 0.5s linear all;

    display: block !important;
    opacity: 1;
}


.alert.ng-hide {
    opacity: 0;
}

The documentation for animating the ng-hide directive can be found here see the Animations section.

Upvotes: 1

Related Questions