控制器不接受传回给它的期间。那么我如何传回参数required_doc.completion_status
?
<a ng-class="completion_status(required_doc.completion_status)">
{{required_doc.completion_status}}% Complete
</a>
$scope.completionClass = function(required_doc.completion_status) {
if(required_doc.completion_status == 100)
return "success"
else
return "failure";
};
答案 0 :(得分:0)
你不应该在函数的参数名称中添加一个点:
$scope.completionClass = function(status) {
if(status == 100)
return "success"
else
return "failure";
};