I'm developing an extension using angular. When the controller is load I need to charge information from the local storage :
var app = angular.module("Logins");
app.controller("LoginsCtrl", function($scope) {
chrome.runtime.sendMessage({message: "get_data"}, function(response) {
$scope.myText = response.value;
});
});
And in the view a very simple :
{{ myText }}
If I init the value with a default value it is display properly, when I check the console.log, the value is correct. But the view is not refreshed.
I've seen some question about tick(), detectChanges() but I don't understand how to use those function, angular keep saying to me the function is undefined.
Can you help me ?
Thanks,
Regards,
Martin