Updated the procedure by using appDetermine and the run method of angular to access $timeout.