Hello,
I've been using HAML extensively for a very long time, but am puzzled by something and i finally decided to ask.
Let's say i want this:
<a ng-repeat='foo' ng-class='bar'>Hi there!</a>
This is easily translatable to HAML like this:
%a{ ng: { repeat: 'foo', class: 'bar' } } Hi!
However, I find myself in an awkward situation when i have to translate something like this:
<a ui-sref='foo' ui-sref-active='bar'>Hi!</a>
The only solution i have found so far is this, and i'm really not happy with it:
%a{ 'ui-sref'=>'foo', 'ui-sref-active'=>'bar' } Hi!
How would one model this very example with clean hashy syntax using HAML please? Is there an way to tell HAML to use something as our "anonymous" hash top-level value, eg:
%a{ ui: { sref: { special_sym: 'foo', active: 'bar' } } } Hi!
I have tried this:
%a{ ui: { sref: { ''=>'foo', active: 'bar' } } } Hi!
But it generates this:
<a ui-sref-='foo', ui-sref-active='bar'>Hi!</a>
How do you guys accommodate with this problem? Is there anything wrong in my approach / why?
Thanks!
Pierre.