Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Commit

Permalink
feat(buttons): hide nested inputs
Browse files Browse the repository at this point in the history
- Hide nested input elements

Closes #4282
  • Loading branch information
wesleycho committed Aug 28, 2015
1 parent ef668f6 commit a06afe6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/buttons/buttons.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)));
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit a06afe6

Please sign in to comment.