Actually my version works like yours, the functionality is fine, but plus
to that it also sends an error to "$exceptionHandler" factory where real
errors go.
Here is where "TypeError: fn is not a function" is thrown.

El lun., 17 ago. 2015 a las 13:22, A Matías Quezada (<[email protected]>)
escribió:

> Thanks Sander that's what I did, I pasted the output in the email.
>
> If you see a different output then maybe my version is outdated: "1.3.15"
>
> El lun., 17 ago. 2015 a las 12:50, Sander Elias (<[email protected]>)
> escribió:
>
>> Hi A Matias,
>>
>> You already can use $timeout(duration).then(doSomething). You can try
>> this for yourself. open up the developers console in your browser and type:
>> var t = angular.injector(['ng'])
>> var to = t.get('$timeout')
>> to(2000).then(function(){console.log('hi')}))
>>
>> the result will be:
>> Promise {$$state: Object}
>>
>> and 2 seconds later:
>> hi
>>
>>
>> (well at least it did in my browser ;)
>>
>> Regards
>> Sander
>>
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "AngularJS" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/angular/AuJgZfNEBms/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/angular.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to