I'm using isoated scope in a directive. Everything seems to work fine. I set a =
scope on two properties and bind to them in my template. Then, in my controller I call my service, get the data and push it onto the bound objects.
What is really wigging me out is that I can both log and set a break point and can see the data, but angular doesn't update the binding (although it updates my bool field just fine).
I've provided a plunkr: http://plnkr.co/edit/8sVwaea5Amqvf3yiI1Nm?p=preview
And the relevent code portion is:
if (navigator.geolocation) {
//navigator.geolocation.getCurrentPosition(success, fail);
$timeout(function() { success({testdata: "bogusdata"}) }, 1500);
} else {
fail({ error: "navigator.geolocation not available"});
}
Clearly, if I use my $timeout mock, it works just fine. But if I substitute the getCurrentPosition function, nothing updates (but it DOES LOG)?!?!
Help?