wrap api call in $timeout
wrap api call in $timeout

it's needed in case when digest cycle is not finished yet

alexanderpa/angular-tree-control,LSEducation/angular-tree-control,alexanderpa/angular-tree-control,LSEducation/angular-tree-control