I am new on angular, I want to change color of radio button is it selected and also want to get that value. I tried a lot but getting $scope is undefined. Here is my code HTML
<form action="" ng-controller="howSoonContr">
<div class="form-group">
<div data-toggle="buttons">
<label class="btn btn-default btn-circle btn-lg active"><input type="radio" name="q1" value="0" ng-change="howSoonClick()" ng-model="time.min"><a>5 mins</a></label>
<label class="btn btn-default btn-circle btn-lg"><input type="radio" name="q2" value="1" ng-model="time.min"><a>10 mins</a></label>
<label class="btn btn-default btn-circle btn-lg"><input type="radio" name="q3" value="2" ng-model="time.min"><a>20 mins</a></label>
<label class="btn btn-default btn-circle btn-lg"><input type="radio" name="q4" value="3" ng-model="time.min"><a>30 mins</a></label>
<label class="btn btn-default btn-circle btn-lg"><input type="radio" name="q5" value="4" ng-model="time.min"><a>45 mins</a></label>
</div>
</div>
</form>
This is my js
.controller("howSoonContr", function($scope) {
console.log("we are in howSoonContr");
//console.log($scope.time);
//if ($scope.time) {
console.log("here is the hello " + $scope.time);
$scope.howSoonClick = function(time) {
console.log("here is the hello " + $scope.time);
}
})
Please help me.