Currently, I am working on developing a component framework and find myself in need of a method to apply styles from multiple directives to an element in a way that they can accumulate. The priority of the styles should be determined by the directive creator (the one modifying the style).
The issue lies at the heart of it:
<div ng-style="firstStyle" ng-style="secondStyle">
Currently, only the first style takes effect while the second one is disregarded.
To demonstrate this problem, I have created a basic Plunkr example where you can see that only one style is being applied:
http://plnkr.co/edit/Cqq83V?p=preview
Is there a straightforward solution to this dilemma?