Skip to content
This repository has been archived by the owner on Nov 22, 2021. It is now read-only.

Use $q.when instead of .then to simplify auto-complete API #237

Closed
mpolichette opened this issue Sep 8, 2014 · 4 comments
Closed

Use $q.when instead of .then to simplify auto-complete API #237

mpolichette opened this issue Sep 8, 2014 · 4 comments

Comments

@mpolichette
Copy link

Hey, small suggestion. If you would use $q.when on the result of the loadFN instead of calling .then on it, you could simplify the API without breaking backwards compatibility. Then the return from the loadFN could still be a promise, but would not HAVE TO be.

I could put this in a pull request if you would like!

Thanks for the awesome code!

@mbenford
Copy link
Owner

mbenford commented Sep 9, 2014

Sounds like a great idea. I appreciate if you could send a PR with this improvement. :)

mpolichette pushed a commit to SpinGo/ngTagsInput that referenced this issue Sep 9, 2014
…to be a promise

Use $q.when to remove api restriction that the result of loadFn must be a promise.
This is a simple non-breaking addition which makes the API more simple to use.

Closes mbenford#237
@mpolichette
Copy link
Author

Done! With a passing test. I tried to match style, but I only dove in enough for this issue. :)

@jgehrcke
Copy link

jgehrcke commented Nov 9, 2014

Pulling this one in would be nice. So far I needed to include a promise polyfill into my web app just for this part of ngTagsInput.

@guzart
Copy link

guzart commented Nov 21, 2014

+1 for merge

@mbenford mbenford added this to the Backlog milestone Nov 21, 2014
@mbenford mbenford modified the milestones: 2.2.0, Backlog Mar 2, 2015
Bessonov pushed a commit to Bessonov/ngTagsInput.ie8 that referenced this issue May 3, 2015
…n a promise

Use $q.when to remove api restriction that the result of the source option
must be a promise. This is a simple non-breaking addition which makes the
API more simple to use.

Closes mbenford#237
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants