Friday 15 January 2010

angularjs - How to get the element from an html function call? -



angularjs - How to get the element from an html function call? -

i have 1 function update multiple progress bars :

$scope.updateexpprogressbar = function(unit) { homecoming ((unit.exp * /*here need max width of progress bar*/) / unit.nextlevel) + "px"; };

html example:

<div class="progress-bar"> <div class="progress-bar-value" style="width: {{updateexpprogressbar(selectedunit)}}"></div> </div>

the thing these progress bars don't have same width, , don't want create 1 function every 1 of them.

angularjs

No comments:

Post a Comment