I am using haml templates with angular js. While template rendering i want to create a function call on div using ng-click. It is working fine without parameter but when I am passing a parameter to function it behaving like as below for two cases.
%div.sitesContainer
.wrapper
%div.site{"ng-repeat"=>"site in sites",'ng-click'=>"siteBlockclick({{site.id}})"}
%span
{{site.name}}
Then it is giving me error Syntax Error: Token 'site.id' is unexpected But I inspect div it is showing ng-click="siteBlockclick(BWN)"
means value is coming but single quotes are missing.
%div.sitesContainer
.wrapper
%div.site{"ng-repeat"=>"site in sites",'ng-click'=>"siteBlockclick('{{site.id}}')"}
%span
{{site.name}}
If I given single quotes it is printing then it is making call like ng-click="siteBlockclick('{{site.id}}')"
How should I concat it so that It will work for me ?
I want something like ng-click="siteBlockclick('BWN') after inspect
Any help appreciated.