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

RFE: Implement <optgroup> in ng:options #450

Closed
unirgy opened this issue Jul 6, 2011 · 7 comments
Closed

RFE: Implement <optgroup> in ng:options #450

unirgy opened this issue Jul 6, 2011 · 7 comments
Assignees

Comments

@unirgy
Copy link
Contributor

unirgy commented Jul 6, 2011

No description provided.

@ghost ghost assigned mhevery Jul 6, 2011
@mhevery
Copy link
Contributor

mhevery commented Jul 14, 2011

Current plan is to support

person.first group by person.last for person in people

Would that be sufficient?

@unirgy
Copy link
Contributor Author

unirgy commented Jul 14, 2011

Yes, and how person.id will be incorporated for binding?

@unirgy
Copy link
Contributor Author

unirgy commented Jul 14, 2011

ng:options="person.id as person.first group by person.last for person in people" ?

@mhevery
Copy link
Contributor

mhevery commented Jul 14, 2011

yes, that will work

@unirgy
Copy link
Contributor Author

unirgy commented Jul 14, 2011

Just a personal note, i think that's way too cumbersome.. Is there a reason to introduce a special rigid syntax?

Compare with:

ng:options="{from:people, id:'id', label:'first', group:'last'}"

This allows for further expansion and providing callbacks in addition to static values for dynamic functionality.

@mhevery
Copy link
Contributor

mhevery commented Jul 14, 2011

we are talking about same thing, and I think _ as _ group by _ for _ in _ is easier to read. We can always say _ for _ in _ or any combination there of and you can extend it in the future. We already support functions so you can say

person as nameOf(person) groupBy friendGroup(person) for person in getPeople()

@vojtajina
Copy link
Contributor

Already implemented.

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants