this is my controller code
这是我的控制器代码
$scope.aceOptions = {
workerPath: 'https://localhost:50871/Scripts/app/vendor/',
useWrapMode: true,
showGutter: true,
theme: 'chrome',
firstLineNumber: 1,
onLoad: function (_editor) {
$scope.script = {};
$scope.script.scriptCode = "function fieldName_columnName_" + "functionName(){\n\n\n}";
var _session = _editor.getSession();
_session.setMode('ace/mode/javascript');
var _renderer = _editor.renderer;
_session.on('changeAnnotation', function () {
$scope.annotations = [];
$scope.annotations = _editor.getSession().getAnnotations();
}),
_editor.$blockScrolling = Infinity;
_session.on("change", function (e) {
var currentValue = _editor.getSession().getValue();
$scope.script.scriptCode = currentValue;
});
},
require: ['ace/ext/language_tools'],
advanced: {
enableSnippets: true,
enableBasicAutocompletion: true,
enableLiveAutocompletion: true
}
}
$sc