I'm currently working on incorporating a fade-in effect for text using the second solution from this source when using ng-show
. Here is my HTML setup:
<input ng-focus="hasFocus = true" ng-blur="hasFocus = false"
type="text" placeholder="Click to fade"/>
<p ng-show="hasFocus" class="fader">Fade me</p>
This is how my CSS looks like:
.fader.ng-show {
transition: all linear 500ms;
opacity: 1;
}
.fader.ng-hide {
transition: all linear 500ms;
opacity: 0;
}
Additionally, this is what my Angular code consists of:
var myApp = angular.module('myApp', []);
You can also view a demonstration on JSFiddle here.