Hi Sander,
Thanks for prompt reply. I added `$scope.$apply block in barcode
controller. it was giving me *$digest already in progress.*
$scope.barcode=function(){
getBarcode.scanCodeService()
.then(function(data)
{
console.log('Data: -------------------------- >'+data);
*$scope.$apply(function () {*
* $scope.meterno=data;*
* });*
// $scope.meterno=data;
console.log('meterno : -------------------------- >'+$scope.meterno);
},function(data)
{
alert('error');
}
)
};
I added
Regards,
Ranjeet
On Wednesday, February 25, 2015 at 5:18:54 PM UTC+5:30, Sander Elias wrote:
>
> Hi,
>
> You scan events is coming from 'outside' angular. To make sure the view
> gets the updated data you should add an `$scope.$apply(...)` to your
> function.
> I'm not sure why resolving a promise does not take care for that in this
> case tough?
>
> Regards
> Sander
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.