Hi,
I want to select the group name and click event for group name. any help...
in below example..i want to select Group1.
Ex:
Group1
A
B
Group2
C
D
On Sunday, January 4, 2015 at 9:42:31 PM UTC-8, krunal shah wrote:
>
> hi i would like to select parent node into dropdown. Like group is also
> selected..
>
> On Saturday, 4 May 2013 03:38:17 UTC-7, Sylvain Robez-Masson wrote:
>>
>> I found a solution : http://jsfiddle.net/vDdG2/5/
>>
>> Le vendredi 3 mai 2013 09:40:39 UTC+2, Sylvain Robez-Masson a écrit :
>>>
>>> I don't see any solution with ng-switch.
>>> Maybe something like that : http://jsfiddle.net/vDdG2/2/
>>> But obviously that doesn't work.
>>>
>>> Le jeudi 2 mai 2013 18:17:02 UTC+2, Charles Kilbourne a écrit :
>>>>
>>>> Sylvain you may want to use an ng-switch in your template, if you want
>>>> an example set up a plunk and I'll try to help you out
>>>>
>>>> On Thursday, May 2, 2013 11:14:30 AM UTC-4, Sylvain Robez-Masson wrote:
>>>>>
>>>>> My problem is different, my data looks like this :
>>>>> var categories = [
>>>>> {"id":"Cart","name":"Ma commande"},
>>>>> {"id":18,"name":"Menus"},
>>>>> {"id":14,"name":"Entr\u00e9es"},
>>>>> {"id":5,"name":"Plats","items":[
>>>>> {"id":7,"name":"Viandes"},
>>>>> {"id":8,"name":"Poissons"},
>>>>> {"id":11,"name":"Pizzas"}]
>>>>> },
>>>>> {"id":15,"name":"Desserts"},
>>>>> {"id":17,"name":"Boissons","items":[
>>>>> {"id":1,"name":"Alcoolis\u00e9es"},
>>>>> {"id":3,"name":"Sans alcool"}]
>>>>> }
>>>>> ]
>>>>>
>>>>> Entries without items should be <option>, Entries with items should be
>>>>> <optgroup> and the items of the entry must be <option> of <optgroup>
>>>>> How can I achieve that ?
>>>>>
>>>>> Le mercredi 17 avril 2013 07:49:13 UTC+2, Peter Stephens a écrit :
>>>>>>
>>>>>> Thanks Danny - exactly the problem I was struggling with....
>>>>>>
>>>>>> Pete.
>>>>>>
>>>>>> On Tuesday, 12 March 2013 10:29:01 UTC+8, Danny wrote:
>>>>>>>
>>>>>>> Thanks Clint... that was helpful.
>>>>>>>
>>>>>>> I have also found another way to do it... obvious really, just was
>>>>>>> distracted by the complexities of Angular.
>>>>>>>
>>>>>>> For those interested, the new solution:
>>>>>>>
>>>>>>> <select ng-model='theModel'>
>>>>>>> <option value='choose...'>Choose...</option>
>>>>>>> <optgroup ng-repeat='group in theList' label="{{group.group}}">
>>>>>>> <option ng-repeat='veh in group.items'>{{veh}}</option>
>>>>>>> </optgroup>
>>>>>>> </select>
>>>>>>>
>>>>>>> Updated plunk: http://plnkr.co/edit/PzXtExf7SkDvtf78cdnb
>>>>>>>
>>>>>>> Danny
>>>>>>>
>>>>>>>
>>>>>>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.