Open danieletdg opened 9 years ago
Hi Guys, i 'd like to use this plugin and integrate it with my Angular js app. But i've some issue with the ng-repeat. Anyone has used dragend with angular? This is my simple code. I've create a custom directive like this:
Custom directive
(function(){ var app = angular.module('Pizzapp', ["ngMaterial"]); app.controller('homeCtrl', ['$http' , '$scope', function($http, $scope){ $scope.pizze = []; $http.get('source').success(function(data) { $scope.pizze = data; }); }]); app.directive('myProduct', function($timeout) { return { restrict: 'A', scope: { pizze: '=' }, link: function(scope, element, attrs) { scope.$watch("my-product", function (newValue, oldValue) { $timeout(function() { $('#demo').dragend(); }); }); } }; }); })();
then the html code
<div id="demo" my-product> <div class="dragend-page" style="background:red; height:600px;"></div> <div class="dragend-page" style="background:purple; height:600px;"> <div class="col s12 m6 l4" ng-repeat="pizza in pizze"> <div class="card-panel"> <span class="balck-text">{{pizza.nome}}</span> </div> </div> </div> </div>
info:
Thank you, Daniele
Hi Daniele,
Did you get any progress with this issue? I'm facing the same problem here, maybe you could help me out...
Cheers!
Sorry Tulio, no pogress here.
Same problem :(
Hi Guys, i 'd like to use this plugin and integrate it with my Angular js app. But i've some issue with the ng-repeat. Anyone has used dragend with angular? This is my simple code. I've create a custom directive like this:
Custom directive
then the html code
info:
Thank you, Daniele