Move "Save on Ctrl+Enter" into AnnotationController
Move the DOM event listener function that saves an annotation on Ctrl+Enter into AnnotationController. This is just for the sake of keeping all the code in one place (in AnnotationController, not in the directive's link function) and putting code where it can be tested more easily. Note that the controller's save() function was previously called with scope.$evalAsync() and we're now just calling it synchronously. This seems to be fine.
Showing
Please register or sign in to comment