Is there a way to use math functions in AngularJS bindings?
e.g.
The percentage is {{Math.round(100*count/total)}}%
That doesn't look like a very Angular way of doing it. I'm not entirely sure why it doesn't work, but you'd probably need to access the scope in order to use a function like that.
My suggestion would be to create a filter. That's the Angular way.
myModule.filter('ceil', function() {
return function(input) {
return Math.ceil(input);
};
});
Then in your HTML do this:
The percentage is {{ (100*count/total) | ceil }}%