angularjs-dragula
angularjs-dragula copied to clipboard
Save position
Is there any way to store custom position to the base, so when the user next time login, the position of the box are not changed. I don't want to store position to local storage or cookie, I want to store position to API.
@bokrizan Have some ideas now? I want make the same thing work.
first, you need to get all div id in order like on your web page (when you with dragula change position), and after, I push this ID in the array and send to the server
var orderById = []; var orderDiv = $("#dragulaBox").children("div"); angular.forEach (orderDiv, function(key, value){ orderById.push(key.id); }) var data = {graphsConfig: orderById}; $http.post(someURL, data, config)
And, when you again come back to site, you get from your API array with order.