Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

ng:options directive #301

Closed
mhevery opened this issue Mar 7, 2011 · 2 comments
Closed

ng:options directive #301

mhevery opened this issue Mar 7, 2011 · 2 comments
Assignees
Milestone

Comments

@mhevery
Copy link
Contributor

mhevery commented Mar 7, 2011

This code is broken:
{{value}}

It never quite does the right thing and it is a bit slow

It should be

corner cases to think about

  • What do you show when selection='X' and there is not 'X' in values?
    • I think we should create an extra blank option
    • should the option stay there. In other words can the user choose it?
  • Can we remove ng:format="index" I don't think it is needed
@esprehn
Copy link
Contributor

esprehn commented Mar 7, 2011

We should just support JS array comprehension syntax instead of the new "display as" keywords.

https://developer.mozilla.org/en/new_in_javascript_1.7#Array_comprehensions_(Merge_into_Array_comprehensions)

ng:options="format(value) for each value in values"

@mhevery
Copy link
Contributor Author

mhevery commented Mar 7, 2011

Love it!

@ghost ghost assigned mhevery Apr 29, 2011
@mhevery mhevery closed this as completed in 2ba2225 Jun 8, 2011
mhevery added a commit to mhevery/angular.js that referenced this issue Jun 8, 2011
mhevery added a commit to mhevery/angular.js that referenced this issue Jun 8, 2011
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants