Default textarea value in angularjs when textarea is bound to model

angularjs, javascript

Solution

Inside your controller you can do as below:

$scope.user = {
    ban_reason:"reason"
}

Problem

HTML: ``` <textarea ng-model="user.ban_reason"></textarea> ``` Initially the ban reason is empty. However I want to provide a default value. But ``` <textarea ng-model="user.ban_reason">reason</textarea> ``` Does not work. Any ideas how to do that?

Original source