0
I’m trying to make a checkbox behave like a radio, but I’m not getting a few examples but I don’t understand how it works. If anyone can help me. I thank you in advance for your attention!
var app = angular.module('plunker', []);
app.controller('MainCtrl', function($scope) {
$scope.pp = ["feminino", "masculino", "outros"];
});
<!DOCTYPE html>
<html ng-app="plunker">
<head>
<meta charset="utf-8" />
<title>AngularJS Plunker</title>
<script>document.write('<base href="' + document.location + '" />');</script>
<link rel="stylesheet" href="style.css" />
<script data-require="[email protected]" src="http://code.angularjs.org/1.1.5/angular.min.js" data-semver="1.1.5"></script>
<script src="app.js"></script>
</head>
<body ng-controller="MainCtrl">
<h1> ng-repeat </h1>
<div data-ng-repeat="p in pp">
<input type="checkbox">
{{p}}
</div>
</body>
</html>
That you select one and uncheck the others?
– novic
That never gets more than one option selected.
– Ana Carolina