diff --git a/ionic/components/icon/icon.ts b/ionic/components/icon/icon.ts
index d3c25c8c2f..94128fa381 100644
--- a/ionic/components/icon/icon.ts
+++ b/ionic/components/icon/icon.ts
@@ -38,13 +38,15 @@ export class Icon {
) {
let ele = elementRef.nativeElement;
- this.mode = config.setting('mode');
+ this.mode = config.setting('iconMode');
+
this.iconLeft = this.iconRight = this.iconOnly = false;
this.ariaHidden = true;
+ this.isInactive = ele.hasAttribute('inactive');
this.iconAttr = null;
for (let i = 0, l = ele.attributes.length; i < l; i++) {
- if (ele.attributes[i].value === '') {
+ if (ele.attributes[i].value === '' && /_|item-|inactive|class/.test(ele.attributes[i].name) !== true) {
this.iconAttr = ele.attributes[i].name;
}
}
diff --git a/ionic/components/icon/test/basic/main.html b/ionic/components/icon/test/basic/main.html
index f72073ce70..2f2db26c03 100644
--- a/ionic/components/icon/test/basic/main.html
+++ b/ionic/components/icon/test/basic/main.html
@@ -1,28 +1,61 @@
-
-
+
+ Icons
+
-
+
-
-
+
-
+
+
+
+ <icon ion-home></icon>
+
+
-
-
+
+
+
+ <icon inactive ion-home></icon>
+
+
-
+
+
+
+ <icon name="ion-home"></icon>
+
+
-
-
+
+
+
+ <icon [name]="homeIcon"></icon>
+
+
-
+
+
+
+ <icon ios="ion-social-apple" md="ion-social-android"></icon>
+
+
-
-
+
+
+
+ <icon inactive ios="ion-social-apple" md="ion-social-android"></icon>
+
+
-
+
-
-
+
+
+