<div ng-controller="DynamicCtrl">
<input type="radio" ng-model="$parent.lunch" ng-repeat="m in meat"
ng-value="m" name="lunch">
{{lunch}}
</div>
Should do the trick.
As I understand it, ng-repeat
creates its own $scope
. so you need to refer to the $parent $scope;
Yes, AngularJS is tricky. Also you need to change the value
to ng-value
too.