0

I have some issues creating an onclick eventhandler in an angular app.

<a onclick="OpenCalloutAndSelectItem(this, event, this, '({{fileInfo.id}})'); return false;" id="padocitem_{{fileInfo.id}}">...</a>

outputs:

<a onclick="OpenCalloutAndSelectItem(this, event, this, '({{fileInfo.id}})'); return false;" id="padocitem_13">...</a>

Instead of writing the value of fileInfo.Id in the onclick eventhandler the words "fileInfo.id" is being printed.

In the id attribute of the tag I do get the correct value.

What is the trick here?

6
  • nope. That prints: OpenCalloutAndSelectItem(this, event, this, '(fileInfo.id)'); return false; Commented Oct 30, 2017 at 11:32
  • any reason why you can't adapt ng-click ? Commented Oct 30, 2017 at 11:34
  • If just saw that I have to move it into the controller stackoverflow.com/questions/32377632/… Commented Oct 30, 2017 at 11:35
  • why not ng-click="OpenCalloutAndSelectItem(this, $event, this, '(fileInfo.id)'); ? Commented Oct 30, 2017 at 11:37
  • use ng-click instead of onclick event handler Commented Oct 30, 2017 at 11:37

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.