Cannot get textarea value in angularjs

Your problem lies in the ui-if part. Angular-ui creates a new scope for anything within that directive so in order to access the parent scope, you must do something like this:

<textarea ng-model="$parent.noticeText"></textarea>

Instead of

<textarea ng-model="noticeText"></textarea>

Leave a Comment