Closed lithammer closed 10 years ago
Shouldn't controller be instantiated only when NotesService.Query() gets data? I'm not sure about that, this evening I'll investigate and merge your PR, thanks for that
Here's what little documentation I could find about it:
$promise
: the promise of the original server interaction that created this instance or collection.On success, the promise is resolved with the same resource instance or collection object, updated with data from server. This makes it easy to use in resolve section of $routeProvider.when() to defer view rendering until the resource(s) are loaded.
Thanks for your contribution, I've mentioned you on the README.
Imagine the following code snippet:
Without returning
$promise
, this will always print[]
. However with$promise
it will print the actual list of items returned from the server.