These are chat archives for angular/angular-2-ionic-2
Say we have a button component. It has an attribute available called
look that sets a class depending on the given value. For example, you could do:
<ion-button look="3d-button">Button</button> <ion-button look="ios-button">Button 2</button>
Depending on the value of the
look attribute, we want to add a class
3d-button to the button when its component is instantiated.
The problem with this is that if the developer has hundreds of
<ion-button> components, adding the class to the button after it's already in the DOM is expensive.
Is there a way we could access the component's element before it's in the DOM and add these classes to it?