From a06afe6bc158bc941a232ee170765590a4e634c1 Mon Sep 17 00:00:00 2001 From: Wesley Cho Date: Wed, 26 Aug 2015 11:50:04 -0700 Subject: [PATCH] feat(buttons): hide nested inputs - Hide nested input elements Closes #4282 --- src/buttons/buttons.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/buttons/buttons.js b/src/buttons/buttons.js index ecec408dd5..6229105ea9 100644 --- a/src/buttons/buttons.js +++ b/src/buttons/buttons.js @@ -18,6 +18,8 @@ angular.module('ui.bootstrap.buttons', []) link: function(scope, element, attrs, ctrls) { var buttonsCtrl = ctrls[0], ngModelCtrl = ctrls[1]; + element.find('input').css({display: 'none'}); + //model -> UI ngModelCtrl.$render = function() { element.toggleClass(buttonsCtrl.activeClass, angular.equals(ngModelCtrl.$modelValue, scope.$eval(attrs.btnRadio))); @@ -50,6 +52,8 @@ angular.module('ui.bootstrap.buttons', []) link: function(scope, element, attrs, ctrls) { var buttonsCtrl = ctrls[0], ngModelCtrl = ctrls[1]; + element.find('input').css({display: 'none'}); + function getTrueValue() { return getCheckboxValue(attrs.btnCheckboxTrue, true); }