AngularJs add animation to ng-swipe

12,251

If you want to do something like this;

http://onehungrymind.com/demos/slider-touch/

Check how using in Angular 1.2 here;

http://onehungrymind.com/build-sweet-angularjs-photo-slider-pt-2-ngtouch/

Another tutorial here;

http://www.script-tutorials.com/demos/366/index.html#

Share:
12,251
Liad Livnat
Author by

Liad Livnat

Awesome client side / server side / mobile (HTML5) / facebook developer. Web Client: AngularJS, Backbone.js, Ember.js, Javascript(JQuery), HTML5, CSS3. Server: PHP - cake, CodeIgniter, Symfony, Laravel, Ruby , MVC 4.0, C# and ASP.NET 4.0 Database: MongoDB, mySQL, MSSQL ,Azure, Google Cloud : Azure, Amazon EC2, engineyard, Rackspace Source Controls: TFS, SVN, BitBucket, Git http://il.linkedin.com/in/liadl/ http://liadlivnat.com

Updated on June 04, 2022

Comments

  • Liad Livnat
    Liad Livnat almost 2 years

    i'm facing a real challenge here :) Adding animation to ng-swipe operation, i have line that i'm swapping, i want it to slide-left or slide-right then the new line will be appear instead, currently it is showing like on/off switch it just dissapear.

    Do i need to create directive? can i use only css? Can you help with an example I was searching over the net and haven't found anything helpful. Thanks

    div.add-to-favorite-open(ng-show="showActions && item.is_favorite==false",ng-swipe-left="showActions = false",data-ng-click='add_pro_to_favorite(item); showActions=!showActions')
                            div.add-to-favorite-image
                            p.add-to-favorite-text Add to Favs
    div.remove-from-favorite-open(ng-show="showActions && item.is_favorite==true",ng-swipe-left="showActions = false",data-ng-click='remove_from_favorite(item); showActions=!showActions')
                            div.add-to-favorite-image
                            p.add-to-favorite-text Remove from Favs     
    div.contact-slide(ng-show="!showActions",ng-swipe-left="showActions = true")