ace-angular
Using Ace Editor in AngularJS
Requeriments
- AngularJS: npm install angular
- Ace Builds: npm install ace-builds
Install
npm install ace-angular
Usage
<script src="node_modules/angular/angular.js"></script>
<script src="node_modules/ace-builds/src-min/ace.js"></script>
<script src="node_modules/ace-builds/src-min/ext-language_tools.js"></script>
<script src="node_modules/ace-angular/ace-angular.js"></script>
Create angular module
var app = angular.module('myapp',['ace.angular']);
Using directive
<div ace-editor="aceOptions" ng-model="aceContent"></div>
Controller
$scope.aceOptions = {
method: 'sql',
theme: 'sqlserver',
onLoad: function(editor, session, ace){
}
}