app/tutoranimangularjs.js
/**
 * @name ifJsAnimation
 * @desc The ngIf sample animation function
 */
@name ifJsAnimation
@desc The ngIf sample animation function
@name ifJsAnimation @desc The ngIf sample animation function
function ifJsAnimation() {
    function animateOpacity(element, done, opacity) {
        jQuery(element).animate({
            opacity: opacity
        }, 3000, done);
    }
    var enterAnimation = function (element, done) {
        jQuery(element).css({ opacity: 0 });
        animateOpacity(element, done, 1);
        return function (isCancelled) {
            if (isCancelled) {
                element.stop();
            }
        };
    }
    var leaveAnimation = function (element, done) {
        animateOpacity(element, done, 0);
        return function (isCancelled) {
            if (isCancelled) {
                element.stop();
            }
        };
    }
    return {
        enter: enterAnimation,
        leave: leaveAnimation
    };
}
function ifJsAnimation ( ) { function animateOpacity ( element , done , opacity ) { jQuery ( element ) . animate ( { opacity : opacity } , 3000 , done ) ; } var enterAnimation = function ( element , done ) { jQuery ( element ) . css ( { opacity : 0 } ) ; animateOpacity ( element , done , 1 ) ; return function ( isCancelled ) { if ( isCancelled ) { element . stop ( ) ; } } ; } var leaveAnimation = function ( element , done ) { animateOpacity ( element , done , 0 ) ; return function ( isCancelled ) { if ( isCancelled ) { element . stop ( ) ; } } ; } return { enter : enterAnimation , leave : leaveAnimation } ; }
@name ifJsAnimation
 @desc The ngIf sample animation function
@name ifJsAnimation @desc The ngIf sample animation function
/**
     * @name enterAnimation
     * @desc The enter animation function called when an element enters DOM
     * @param element - The element that is entering DOM
     * @param done - Callback function, it must be called to finish the animation
     */ //Animate the opacity // Here is the optional return function that treats completed or cancelled animations /**
     * @name leaveAnimation
     * @desc The leave animation function called when an element leaves DOM
     * @param element - The element that is leaving DOM
     * @param done - Callback function, it must be called to finish the animation
     */ // Here is the optional return function that treats completed or cancelled animations