I'm facing a simple issue that doesn't seem to have an easy fix. I have a ng-repeat
set up like this
<p ng-repeat="title in Menu.data[Menu.selected]">
{{ title }}
</p>
Now, I want to add an onclick
event so I adjusted it as follows
<p ng-repeat="title in Menu.data[Menu.selected]" onclick="show({{ title }})">
{{ title }}
</p>
Unfortunately, the onclick="show({{ title }})"
is not being interpreted by Angular. Any ideas why?
UPDATE: Just to clarify, show
is a regular JavaScript function and not $scope.show