Apply CodeMirror to a ng-model-bound textarea
|Added at||2016-12-27 13:12|
I am coding a very very basic playground. For some reason, I need to embed the html panel inside an AngularJS app.
In this version, I put a JQuery change listener to the CSS panel, and applied CodeMirror to the textarea. And it worked.
I felt uncomfortable about having a JQuery event listener inside an AngularJS app, so I decided to bind the CSS panel to the AngularJS app, and made this version. But now, the problem is the CodeMirror code (that I comment below) does not work anymore:
Does anyone know how to make CodeMirror work here?
Additionally, is it really a bad idea to use JQuery event listeners inside an AngularJS app? What's the best structure to code this playground that uses AngularJS + CodeMirror?