You may be able to use ng-animate (have not messed with it yet, but it will 
want to use css transitions)... For jQuery methods, write a directive for 
any element you want to have this effect... something like:

<div slide-up="fast">Hello World</div>

.directive('slideUp',
function(){
return {
link: function(scope, element, attrs) {
    element.slideUp(attrs.slideUp)
}
}
}
)

This is an over simplified version. It will perform the animation as soon 
as the element is loaded... 

You probably need more some specific timing, but the directive is your 
friend for jQuery code.  If you want it to wait until some moment, like 
when it gets displayed, and a more generic directive for either direction, 
you can do something like this:

<div slide-animate="fast" direction="down">Hello World</div>

.directive('slideAnimate',
function(){
return {
link: function(scope, element, attrs) {
    scope.$watch(
function(){ return element.is(':visible') }, //watches for element to 
become visible
function(isShown){  
if (isShown){
switch (attrs.direction){
 case 'up': element.slideUp(attrs.slideAnimate); break;
 case 'down': element.slideDown(attrs.slideAnimate); break;
break;
}
}
)
}
}
}
)

On Thursday, April 17, 2014 4:01:55 PM UTC-6, Rodrigo Mendonça wrote:
>
> I am new in angular and i think slideUp and slideDown is a good way to 
> deliver user experience. But in angular i am not finding any solutions to 
> do that. Im my project i have angular and jquery. 
> How can i mix slideUp e slideDown from jQuery on angular way, with 
> reusable code?
>
> Thanks
>
> -- 
> Rodrigo Mendonça
>
> 

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to