Ok for the counter but not for the functions.
<pre>
+                   'ng-mouseover="addLayer(' + attrName + ')" ' +
+                   'ng-mouseout="removeLayer(' + attrName + ')"';
</pre>