From 18499c3d4d6a0000d782cee657885ec516c213f6 Mon Sep 17 00:00:00 2001 From: mhartington Date: Fri, 11 Sep 2015 16:05:27 -0400 Subject: [PATCH] fix(ionRadio): fix custom icons --- js/angular/directive/radio.js | 3 ++- test/html/input-radio-zarko.html | 31 ++++++++++++++++--------------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/js/angular/directive/radio.js b/js/angular/directive/radio.js index 823d5d417b0..896afc65cd3 100644 --- a/js/angular/directive/radio.js +++ b/js/angular/directive/radio.js @@ -43,7 +43,8 @@ IonicModule compile: function(element, attr) { if (attr.icon) { - element.children().eq(2).removeClass('ion-checkmark').addClass(attr.icon); + var iconElm = element.find('i'); + iconElm.removeClass('ion-checkmark').addClass(attr.icon); } var input = element.find('input'); diff --git a/test/html/input-radio-zarko.html b/test/html/input-radio-zarko.html index f70f9747b8d..02dc786ea73 100644 --- a/test/html/input-radio-zarko.html +++ b/test/html/input-radio-zarko.html @@ -2,7 +2,7 @@ - + Radio Buttons @@ -11,41 +11,42 @@ - +

Radio Buttons

- + - +
- -
+ +
Clientside, Selected Value: {{ data.clientSide }}
- + {{ item.text }} - +
Serverside, Selected Value: {{ data.serverSide }}
- + {{ item.text }} - +
- + - +