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

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

objective c - Is there a way in OCMockito to make stubs fail when an unknown method is called? -

jquery - jqGrid update specific column data with out refreshing the entire column? -