javascript - AngularJS: Function call on ngSwipeLeft -


The title tells too much all this. NgSwipeLeft input = "some function ()" is not working because I hope it will be. Maybe I am doing it wrong, but what are your thoughts? There is documentation for ngSwipeLeft.

Thanks, Ben

I think that What you need to do is create a controller for that JavaScript, and then work through its scope

  & lt; Div ng-show = "showcase" data-ng -swap-left = "some function ()" & gt; Some list content, such as an email in the inbox & lt; / Div & gt; & Lt; Div ng-show = "showActions" data-ng-swipe-right = "some function ()" & gt; "gt; & gt; Button ng-click =" Answer () "> Answer & lt; / button & gt; & lt; button; ng-click =" Delete () "& gt; Delete & lt; / button & gt; & lt; / div & gt;   

and JS

  $ scope.showActions = false; $ scope.someFunction = function () {$ scope.showActions =! $ scope.showActions;}   

Similarly I do this in my applications. I hope this helps.

Work is done here.

Plunk works, but it is a bit far away, sometimes highlighting instead of switching. While IP is works best.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -