angularjs - How to return result of function in HTML at Angular? -


how return result in html template fnuction angular js?

html:

<div>{{getname({{type}})}}</div> 

angular js:

$scope.getname = function (type){   return 'bob'; } 

i need bob in div element

remove second pair of curly braces. {{getname(type)}} sufficient.


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

utf 8 - split utf-8 string into bytes in python -

javascript - Js, document.getElementById("ID").innerHTML, error -