Angular $scope variable not updating

后端 未结 6 1499
一整个雨季
一整个雨季 2021-01-02 04:19

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

6条回答
  •  北荒
    北荒 (楼主)
    2021-01-02 04:50

    Do not use plain values like this, you need to put such values into an object, so try in your controller:

    $scope.obj = { letter_content: null};
    

    and then in your view:

    {{obj.letter_content}}
    

提交回复
热议问题