J
J
JIakki2015-09-16 13:30:39
JavaScript
JIakki, 2015-09-16 13:30:39

Why is ng-click not working properly?

html

div(ng-repeat='data in user.moneySource')
  img.change(src="images/control/settings.svg", ng-click="showSettings($event, 'money', '{{data.img}}', '{{data.name}}')")

84ac12402547457982ed161997391a32.png
$scope.showSettings = (event, block, img, name) ->
    console.log img, name // {{data.img}}, {{data.name}}

What is the problem?
thanks in advance

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2015-09-16
@JIakki

well you pass a string, you get a string... where is the problem?
you probably wanted to do this:

img(
    src="images/control/settings.svg",
    ng-click="showSettings($event, 'money', data.img, data.name)"
).change

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question