Going a bit insane with this one. I've google for a couple of hours, but can't figure it out...
Basically, I have a form, with a row of radio buttons. (The data is being pulled through, by ng-repeat, but it's basically just a name of a drink, with a price value). EG. Name: Latte. Price: 2.00
<div class="field">
<label class="radio" ng-repeat="drink in grindsIndex.menuDrinks" >
<input id='drinkRadio' type="radio" ng-model="value"
value="{{ drink.price }}" placeholder="{{ drink.name }}"
name="name" ng-model="grindsIndex.name"
ng-change="newValue(value)" ng-click="clickMethod()";/>
{{ drink.name }}
</label>
</div>
When a check box is clicked, I want another row of radio buttons to appear, by removing the class hide. (This has an ng-repeat, of another list of name values, with price values being pulled through). Eg: Name: Honey, Price: 0.50.
<div id='extrasOptions' class="field hide">
<label class="radio" ng-repeat="extra in grindsIndex.menuExtras" >
<input type="radio" ng-model="value" value="{{ extra.price }}"
placeholder="{{ extra.name }}" name="name"
ng-change='newValue(value)'/
ng-click="count = count + extra.price" ng-init="count=0">
{{ extra.name }}
</label>
</div>
In my relevant controller, I'm trying to add an eventlistener, onclick function, (or whatever I can), to simply remove the class 'hide', from the second row of checkboxes, so they appear.
$scope.clickMethod = function () {
extrasOptions.removeClass('hide');
};
But every time, I get an error..
app.js:33457 Error: [jqLite:nosel] Looking up elements via selectors is not supported by jqLite!"
It's almost as if I can't use 'removeClass, as my app/angular doesn't like it.
All i want to do, is when you click on any of the radio buttons in the first line of code, make the second set of radio buttons appear...
Can anyone help? Google is showing some complex options and I'm a newbie...
Thank you! Reena