diff --git a/ionic/components/icon/icon.ts b/ionic/components/icon/icon.ts index 31f4962a96..04ea84e87a 100644 --- a/ionic/components/icon/icon.ts +++ b/ionic/components/icon/icon.ts @@ -48,6 +48,13 @@ export class Icon { this.mode = config.get('iconMode'); } + /** + * @private + */ + addClass(className) { + this._renderer.setElementClass(this._elementRef, className, true); + } + /** * @private */ diff --git a/ionic/components/item/item.ts b/ionic/components/item/item.ts index 64c17654d5..390beeee74 100644 --- a/ionic/components/item/item.ts +++ b/ionic/components/item/item.ts @@ -1,6 +1,7 @@ import {Component, ContentChildren} from 'angular2/core'; import {Button} from '../button/button'; +import {Icon} from '../icon/icon'; /** @@ -65,4 +66,11 @@ export class Item { set _buttons(buttons) { Button.setRoles(buttons, 'item-button'); } + + @ContentChildren(Icon) + set _icons(icons) { + icons.toArray().forEach(icon => { + icon.addClass('item-icon'); + }); + } }