Since typeof() is a JavaScript function, and {{ }} are for Angular expression execution, so we are not able to execute JavaScript code or function inside Angular expressions.
To make this happen we need to assign the result value to some $scope variable so that it can be utilised inside our HTML using Angular expressions.
We have to do something similar to explain above by @anpsmn in his fiddle.
Which is :
HTML :
<div ng-app="app" ng-controller="testCtrl">
<p process-indicator="{{checkType()}}">Value: {{checkType()}}</p>
Controller :
angular.module("app",[])
.controller("testCtrl",['$scope', function($scope){
$scope.processIndicator = false;
$scope.checkType = function() {
return typeof($scope.processIndicator)==='boolean'? 'modalProcess' : 'modalClose';
};
}])