In my angular, I define a scope variable $scope.letter_content. When the view is loaded, I load string from my database and set it to $scope.letter_conten
The ng-if directive create a new scope, so the letter_content inside the div is in the ng-if scope, but the letter_content outside is in the controller scope.
Read the API doc to know which directive create new scope.
To avoid this kind of problem consider using the controllerAs syntax