Skip to main content

Steven Wexler

Member since Mar 24, 2015

Recent Blog Comments By Steven Wexler

  • Forcing $q .notify() To Execute With A No-Op In AngularJS

    Posted on Mar 27, 2015 at 1:47 AM

    That's a really clever way to implement "synchronous" notify! I usually invoke notify in a $timeout to get around this. get("/foo").then(handleResolve, null, handleResolve): function get(url) { var deferred = $q.defer(); if (cachedData) { $timeout(function () { deferre... read more »

  • $q.when() Is The Missing $q.resolve() Method In AngularJS

    Posted on Mar 24, 2015 at 12:53 AM

    I thought the same thing when I first started using promises. In fact I went as far as writing $q.noop before discovering $q.when. $q.noop = function () { var deferred = $q.defer(); deferred.resolve(); return deferred.promise; }; I do have one gripe about $q.when though. $q.when(myFunc) w... read more »

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel