我们可以设置类型的复选框图像= QUOT;复选框"与NG重复使用angularjs [英] Can we set checkbox image for type="checkbox" with ng-repeat using angularjs

查看:135
本文介绍了我们可以设置类型的复选框图像= QUOT;复选框"与NG重复使用angularjs的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿,我想设置复选框图像输入类型=复选框与NG-重复。我做了造型部分一切都很好,但是当我设置NG-重复它正在为第一只表
这里是我的CSS文件

Hey I am trying to set check-box image for input type="checkbox" with ng-repeat. I did the styling part everything is fine but when i set ng-repeat it is working for only first list here it is my css file

input[type=checkbox] {
    display:none;
}

  input[type=checkbox] + label {
  padding-left: 23px; height:21px;
background: url(/Content/images/check1-off.png) no-repeat;
font-family: Arial, Helvetica, sans-serif;
font-size:16px; font-weight:600;
color:#ffffff;
text-decoration:none;
margin-bottom: 0px;
display: inline;
}

  input[type=checkbox]:checked + label{
     padding-left: 23px; height:21px;
background: url(/Content/images/check1-on.png) no-repeat;
font-family: Arial, Helvetica, sans-serif;
font-size:16px; font-weight:600;
color:#ffffff;
text-decoration:none;
  margin-bottom: 0px;   
   display: inline;
}

基本上即时与此例如尝试,但它也不能工作NG重复和IM从数据库中检索值。任何一个人可以帮我在这,我这个问题感到震惊。图像

basically im trying with this example but it is also not working for ng-repeat and im retrieving the values from database. Can any one one help me in this I am struck with this issue. Images are

推荐答案

您可以发布您的html code?我猜问题是躺在你的价值...... ID它必须是唯一的。所以,即ID =radiobutton1应该是ID ={radibutton {$指数}}。但是,发表您的html code和生病给一个更好的答案。

Can you post your htmlcode? I would guess the problem is lying in your id value... It has to be unique. So i.e. id="radiobutton1" should be id="radibutton{{$index}}". But post your htmlcode and ill give a better answer.

这篇关于我们可以设置类型的复选框图像= QUOT;复选框"与NG重复使用angularjs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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