My goal is to trigger a specific controller method upon clicking on certain text. This function will then make remote calls to another server and handle the display of another div based on the response. Additionally, I need to pass parameters to this function - one being static text and the other an AngularJS variable (an element from a list I am iterating through).
However, I am unsure about the correct approach as the code snippet below doesn't seem to be working:
<div ng-repeat="item in item_list">
<div><p ng-click="functionToInvoke({{item.name}},
'static text')">{{item.name}}</p></div>
This results in a compile error within the paragraph tag.
How should I address this issue?