My app makes use of socketio to push changes in a textarea to all connected clients. When a user types in the textarea I want two things to happen:
1) Push the text via the socket immediately
2) Save the text to the DB after each change with a 1 second debounce
I've tried this but it won't push or save for some reason:
<div ng-model="text" ng-keyup="push()" ng-change="save()" ng-model-options="{ debounce: 1000 }"></div>
I've also tried this from the docs:
ng-model-options="{ updateOn: 'change', debounce: {'change': 1000} }"
but still no luck. Any help would be much appreciated.