我需要在用户点击特定数字时显示元素并拥有自己的范围,我正在尝试重现此网站的房间选择下拉列表中提供的功能 room selection 。添加房间限制为5,当用户添加新房间时,相同的功能应该应用于具有不同范围的添加房间,我需要在用户单击完成按钮后获取其值。我已经包含了我所做的片段,请看一下。谢谢 的 JsFiffle Link
$scope.showOne = function (index) {
console.log(index);
$scope.One = true;
$scope.Two = false;
$scope.Three = false;
$scope.Four = false;
}
$scope.showTwo = function (index) {
console.log(index);
$scope.One = true;
$scope.Two = true;
$scope.Three = false;
$scope.Four = false;
}
$scope.showThree = function (index) {
console.log(index);
$scope.One = true;
$scope.Two = true;
$scope.Three = true;
$scope.Four = false;
}
$scope.showFour = function (index) {
console.log(index);
$scope.One = true;
$scope.Two = true;
$scope.Three = true;
$scope.Four = true;
}