Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  5] [ 5]  / answers: 1 / hits: 15435  / 11 Years ago, wed, august 14, 2013, 12:00:00

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?


More From » angularjs

 Answers
7

Inside your controller you can do as below:



$scope.user = {
ban_reason:reason
}

[#76365] Monday, August 12, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
christianu

Total Points: 481
Total Questions: 124
Total Answers: 99

Location: Trinidad and Tobago
Member since Thu, Dec 1, 2022
2 Years ago
christianu questions
;