如何使用其索引禁用ng-repeat内的单击按钮 [英] How to disable clicked button inside ng-repeat using its index

查看:60
本文介绍了如何使用其索引禁用ng-repeat内的单击按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用其索引禁用ng-repeat内的点击按钮



我尝试过:



如何使用其索引禁用ng-repeat内的点击按钮

how to disable clicked button inside ng-repeat using its index

What I have tried:

how to disable clicked button inside ng-repeat using its index

推荐答案

试试这个



try this

<!DOCTYPE html>
<html lang="en-US">
<head>
    <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>

    <!--<script src="angular.js"></script>-->
    <script>
        var app = angular.module('myapp', []);
        app.controller('myctrl', myfun);
        function myfun(


scope){


scope.items = [{Name:' apple'},{Name: ' banana'},{Name:' 胡萝卜'},{名称:' 鼓槌'},{名称:' egg'}];
scope.items = [{ Name: 'apple' }, { Name: 'banana' }, { Name: 'carrot' }, { Name: 'drumstick' }, { Name: 'egg' }];


这篇关于如何使用其索引禁用ng-repeat内的单击按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆