I am trying to retrieve values from localStorage and bind them to a checkbox in my Angular app.
//controller code
var storage = window.localStorage;
$scope.Setting = storage.getItem('setting');
//view
<div>{{Setting}}</div>
<input type="checkbox" ng-model="Setting">
In the above code the div will correctly show true or false, however this is not bound to the checkbox. If the code is changed to $scope.Setting = true; this will work, is Angular attempting to bind the model to the checkbox before it has been retrieved from localstorage?