Q:

How do I add a class to a directive?

given:
<span my-directive></span> or
<my-directive></my-directive>
I'd like to add a style to this directive with something like:
.my-directive{
    color:red;
}

or
my-directive{
    color:red;
}

I've seen it done some places but I can't find the official documentation. The way you specify the CSS seems to change depending on if 'require' is A,E, or both. I currently have my directive set to AE, and use it like A, but neither css style is being picked up.

A:

Can't you do like this?:
<span class="my-directive" my-directive></span>

