When the user presses enter in the input box I would like that to reflect in the H1 tag.
As you can see when the user types Line 1 they can press enter and create line 2 in the input no problem, but the output in the h1 tag is still "Line 1 line 2" all on one line.
Please look at the fiddle as that will make a lot more sense.
I was thinking about using a keypress function to get when the user presses enter and then do something with that? I'm not sure if there is a better way though.
https://jsfiddle.net/BSmyth634/ovz8thrp/
<div ng-app>
<form>
<textarea rows="4" type="text" ng-model="todoText" size="30" placeholder="add new todo here">
</textarea>
</form>
<h1>
{{todoText || 'Hello World'}}
</h1>
</div>
`, see the duplicate questions above. You can do this with filter(s) or you can use `white-space: pre` in CSS. – Spencer Wieczorek Oct 02 '16 at 06:45