I'm new to angular js and I have some things need to be clear about angular js. Here is my sample code
<body ng-app="radioExample">
<script>
angular.module('radioExample', [])
.controller('ExampleController', ['$scope', function($scope) {
$scope.color = 'blue';
$scope.disabled = false;
if($scope.color == 'red'){
$scope.disabled = true;
}
}]);
</script>
<form name="myForm" ng-controller="ExampleController">
<input type="radio" ng-model="color" value="red" > Red <br/>
<input type="radio" ng-model="color" value="green"> Green <br/>
<input type="radio" ng-model="color" value="blue"> Blue <br/>
<tt>color = {{color | json}}</tt><br/>
<tt>{{disabled}}</tt><br/>
</form>
</body>
when I select the "Red" button, doesn't it update the value of $scope.disabled into true as I mentioned in if statement? when I need to do it, how can I achieve it?
thank you.