In my opinion the documentation is not that unclear on this: "Binding to a variable [...]". So you just specify a variable in your current scope which will be set to true while the lookup is running. Here is a very dumb example just to show whats happening:
function MainController($scope) {
$scope.lookup = function() {
console.log("isLoading is " + $scope.isLoading);
return [];
}
}
<div ng:controller="MainController">
<input type="text" ng:model="search"
typeahead="result for result in lookup($viewValue)"
typeahead-loading="isLoading"></input>
isLoading: {{isLoading}}
</div>
If you run this and type something in to the search, you will notice that the output is "isLoading: false". However on the javascript console you will see that while the lookup function is running, $scope.isLoading is set to true.
So just specify a variable in your scope with typeahead-loading and then you can do something like this:
<div ng:show="!!isLoading">loading...</div>