I have a scenario where I am using ng-show
with an expression that evaluates to a promise which then resolves to a boolean. This setup is resulting in a 10 digest iterations overflow error.
For reference, you can view the code snippet at http://plnkr.co/edit/XibYM0kCnXhKjNUeTsp3?p=preview
<body ng-controller="MainCtrl">
<p ng-show="returnsABoolean()">non promise</p>
<p ng-show="returnsAPromiseThatResolvesToABoolean()">promise</p>
</body>
Controller:
$scope.returnsABoolean = ()->
true
$scope.returnsAPromiseThatResolvesToABoolean = ()->
$q.when(false)
While I am confident that {{somePromise}}
will resolve successfully, the issue seems to arise with
{{returnsAPromiseThatResolvesToABoolean()}}
.
Any suggestions on how to resolve this? I was expecting this implementation to function as intended..