Only hook codeMirror change event if using ngModel, use scope.$apply correctly (wrap code in apply, not call apply after)
Merge pull request #54 from whitehat101/on-change-apply

scope.$apply and $digest already in use