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

feat(buttons): hide nested inputs #4282

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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