Using futures [when.js, q.js, AngularJS $q, jQuery.defer(), etc.] provides
1) a deferred instance which can be resolved or rejected
2) a promise from that deferred which is READ-only.
3) will fire any attached resolved or rejected handler 1x; even if attached are the resolve/reject action.
Your extensions to $q distort the $q specification in a very disturbing way. Your promise can modify the deferred `value`.
This seems to be in violation of the standard that Promises are read-only. As such, I highly recommend that you avoid using your extension.
AngularJS $q has a unique feature in that a promise can be assigned to as a scope property and later it will resolve/reject as the resolved/rejected value.
| $q promises are recognized by the templating engine in angular, which means that in templates
| you can treat promises attached to a scope as if they were the resulting values.
Since this features is unique to AngJS templating/scopes, I recommend that it should also be avoided ;-)
So the question remains, "How do I used client-side data as a temporary placeholder to a remote data request?"
And the answer is remarkably easy.
1) Do not assign promises to scope properties; assign client-side data values
2) Use resolved handlers to update the scope properties.
I created a a jsFiddle to highlight some ideas:
Do you have a specific example where my solution - conformant to $q standards - will not work ?