Currently when the dome reach the line below this function returnCookie()
is run immediately.
<div class="" ng-init="test.name=returnCookie()">
I would like to delay it for a few seconds maybe something like this
<div class="" ng-init="test.name=Delay(1000,returnCookie())">
Delaying 1000ms before executing returnCookie()
.
I do note not want to use
$timeout(function() {},1000)
inside of the function, as this function only needs to delay in this case while it's use on other page without needing to delay.
Please assist, Thanks.