Reputation: 11
I have an omniture tracking function name as s.tl(parameter 1, parameter 2, parameter 3) which is written in Normal JS code. I want to call that normal JS function on buy now button click and pass Angular expression as third parameter to that function.
So I am using ng-click as below:
<a class="button" href="documentdownloader.aspx?documentid={{document.DownloadLink}}" ng-click="s.tl(true, 'd',{{document.DocumentTitle}})">Buy now </a>
But getting below error
Syntax Error: Token '{' invalid key at column 17 of the expression [s.tl(true, 'd',{{document.DocumentEnglishTitle}});] starting at [{document.DocumentEnglishTitle}});].
Upvotes: 1
Views: 489
Reputation: 8478
Remove the curly braces in your ng-click
, because in ng-click
you are already evaluating the angular expression :
<a class="button" href="documentdownloader.aspx?documentid={{document.DownloadLink}}" ng-click="s.tl(true, 'd',document.DocumentTitle)">Buy now </a>
Upvotes: 1