angulartics / angulartics-google-analytics

Google Analytics plugin for Angulartics
MIT License
133 stars 86 forks source link

Can I use Angular Expressions inside the directive attributes? #65

Closed GonzaloShopear closed 8 years ago

GonzaloShopear commented 8 years ago

I was wondering if I can, by example, write the next directive:

<button angular-on="click" angular-event="{{event.type}}"></button>

amkoehler commented 8 years ago

I can confirm that tracking works properly when using interpolation with an inferred analytics-event, e.g.

<button analytics-on="click" analytics-category="Buttons">{{ buttonLabel }}</button>

The contents of buttonLabel are getting tracked correctly.