Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to pass parameters to an angular js function using brackets.

I want to do something like this:

<a ng-click="doSomething({{value}})" > 

js

$scope.doSomething = function(a){  console.log(a); } 
like image 524
Carlos Pliego Avatar asked Apr 09 '13 15:04

Carlos Pliego


1 Answers

all you need to do is this:

<a ng-click="doSomething(value)" > 
like image 93
Aaron Avatar answered Sep 23 '22 07:09

Aaron