Hello
I have these radio buttons:
<div class="row" ng-controller="GetDados">
<div class="col-lg-10 col-lg-offset-5">
<label class="radio-inline">
<input type="radio" name="optradio" ng-bind="pizza">Pizza
</label>
<label class="radio-inline">
<input type="radio" name="optradio" ng-bind="barras">Barras
</label>
</div>
</div>
That's the idea ..
edit:
What I need is that when choosing a radio button angular take an action, such as displaying a graph through $ scope
edit:
I tried this, it worked:
<div class="row" ng-controller="GetDados">
<div class="col-lg-10 col-lg-offset-5">
<label class="radio-inline">
<input type="radio" name="optradio" ng-click="pizza()" >Pizza
</label>
<label class="radio-inline">
<input type="radio" name="optradio" value="barra()" >Barras
</label>
</div>
</div>
app.controller('GetDados', function($scope, $http){
$http.get('http://localhost/api/v1/index.php/dados').
success(function(data){
$scope.dados = data;
});
$scope.pizza = function() {
console.log("oi");
}
});