angular-ui/ui-codemirror

How i can get value from ui-codemirror?

olaferlandsen opened this issue · 0 comments

Well, i use this obviously used it with AngularJS with coffee. So, how i can get value from it?

My controller :

.controller('EditorCtrl', [
    '$scope'
    ($scope) ->
        $scope.codemirrorLoaded = (_editor) ->
            _doc = _editor.getDoc();
            _editor.focus();
            _editor.setOption('lineWrapping', true);
            _editor.setOption('lineNumbers', true);
            _editor.setOption('mode', 'javascript');
            _doc.markClean()
])

My view:

<div ui-codemirror="{ onLoad : codemirrorLoaded }"></div>

Thanks