I was seeing if there is a way to call a function I designed inside the scope.
<ul class="ui-listview ui-radiobutton" ng-repeat="meter in meters">
<li class = "ui-divider">
{{meter.DESCRIPTION}}
{{htmlgeneration}}
</li>
</ul>
$scope.htmlgeneration = function()
{
blah blah
}
The function is called htmlgeneration. Essentially what I want to do is dynamically append html inside the LI element while using angular.
This question is related to
javascript
angularjs
Yep, just add parenthesis (calling the function). Make sure the function is in scope and actually returns something.
<ul class="ui-listview ui-radiobutton" ng-repeat="meter in meters">
<li class = "ui-divider">
{{ meter.DESCRIPTION }}
{{ htmlgeneration() }}
</li>
</ul>
Source: Stackoverflow.com