I have that line of codes
...
$timeout(tempFunc, $scope.sync.getDelay());
...
at my temp function I have that line of code at end:
$scope.sync.releasePrivilege();
and everything works well. However when I try:
...
$timeout(tempFunc, $scope.sync.getDelay());
$scope.sync.releasePrivilege();
...
It doesn't. I think that I should write that line as a callback function into timeout. I don't want to change recent functions at my code I can just edit that lines.
Any ideas?
PS: The problem is that:
$scope.sync.releasePrivilege();
is not running after timeout, it immediately runs.