Recently delving into JavaScript/Angular development and encountering a little roadblock. I am attempting to break up a string of a textarea into an array at the \n
character within a controller by utilizing $scope.mytext.split("\n")
, however, I keep running into this error:
TypeError: undefined is not a function
I have also experimented with ng-split='\n'
which performs well for text input fields but seems ineffective for textareas.
Any suggestions or guidance on resolving this issue would be greatly appreciated.