Hello guys!
Exist any example with Angular 1.x using directives? I want to do that http://codepen.io/osublake/pen/jrqjdy/?editors=0010 but using Ionic Framework.
Using Ionic list component
<ion-list>
<ion-item draggable ng-repeat="item in items">
Hello, {{item}}!
</ion-item>
</ion-list>
And using Angular directives =>
app.directive('draggable', ['$ionicGesture', function ($ionicGesture) {
return {
restrict: 'A',
link: function (scope, element, attrs) {
//Ionic list
var container = element.parent()[0];
var animation = TweenLite.to(element, 0.3, {
boxShadow: "rgba(0,0,0,0.2) 0px 16px 32px 0px",
force3D: true,
scale: 1.1,
paused: true
});
var dragger = new Draggable(element, {
onPress: onPress,
onDragStart: downAction,
onRelease: upAction,
onDrag: dragAction,
cursor: "inherit",
type: "y"
});
//Any example please?
}
}
}]);
With the following code doesn't work well => https://gist.github.com/jdnichollsc/4c1ae672bfbad6bc364aa42f4dacd38e
And other PoC in Codepen here
Thanks in advance, Nicholls