implements ng-wait with scope.onready