From 0d27e0e537873bd161ec770c2a1533ff989a204f Mon Sep 17 00:00:00 2001 From: Ionitron Date: Thu, 12 Jun 2014 15:32:49 -0600 Subject: [PATCH] amend(ionRadio): make sure value is passed down always --- js/angular/directive/radio.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/js/angular/directive/radio.js b/js/angular/directive/radio.js index 03db7fe72f..af62bdc756 100644 --- a/js/angular/directive/radio.js +++ b/js/angular/directive/radio.js @@ -32,7 +32,7 @@ IonicModule transclude: true, template: '', @@ -40,7 +40,12 @@ IonicModule compile: function(element, attr) { if(attr.name) element.children().eq(0).attr('name', attr.name); if(attr.icon) element.children().eq(2).removeClass('ion-checkmark').addClass(attr.icon); - if(attr.value) element.children().eq(0).attr('value', attr.value); + + return function(scope, element, attr) { + scope.getValue = function() { + return scope.ngValue || attr.value; + }; + }; } }; });