2
我正在使用aungular-ui-ace在我的網站中創建代碼編輯器。一切都很好,但我想包括自動完成選項。選項{enableBasicAutocompletion:true}不爲我工作。如何在編輯器中使用angular-ui-ace添加自動完成選項
我的代碼:
var app = angular.module('MyApp', ['ui.ace']);
app.controller('MyCtrl', function($scope){});
<head>
<script src="/bower_components/angular/angular.js"></script>
<script type="text/javascript" src="/bower_components/ace-builds/src-min-noconflict/ace.js"></script>
<script type="text/javascript" src="/bower_components/angular-ui-ace/ui-ace.js"></script>
</head>
<body ng-app="MyApp" ng-controller="MyCtrl">
<div ui-ace="{mode: 'javascript', enableBasicAutocompletion: true}"></div>
</body>