i have function if works should assign created div(task tile) right user. check link visual of application -> http://gyazo.com/539abe727f0c77be39ac85ee46f4c395 can see task show randomly on grid.
this part of code app.js:
//link user task $scope.linktasktouser = function() { console.log("logging root scope ", $rootscope); (var = 0; < $scope.taskinfo.length; i++) { //doorlopen van alle taken console.log('logging scope taskinfo -->' , $scope.taskinfo); (var j = 0; j < $rootscope.users.length; j++) { //doorlopen van alle users console.log('fasfsda -->'); if ($rootscope.users[j].email == $scope.taskinfo[i].email) { console.log('fasfsda1111'); //vergelijken van emails tussen taken en users $scope.taskinfo[i].top = $rootscope.users[j].offsettop; //top waarde van de taak gelijkstellen aan de offset van de user } } } } my problem log 2 first logs not log third 1 in second loop mean second loop not being executed.
the idea of function loop through task , of users compare email of $rootscope.users of $scope.taskinfo , if there match set top value of $scope.taskinfo equal of $rootscope.users offsettop, tasks show on correct row.
i hope can me out (if need more code better understand situation let me know)
Comments
Post a Comment