的问题:
拼写错误的选项“enableLiveAutocompletion”
拼写错误的选项“enableEmmet”
我的bower.json看起来像这样
{
"name": "fountain-inject",
"version": "0.0.1",
"dependencies": {
"jquery": "^3.1.0",
"angular": "^1.5.0",
"angular-ui-router": "^0.3.1",
"angular-dragula": "^1.2.7",
"medium-editor": "^5.21.0",
"angular-ui-ace": "bower"
},
"overrides": {
"ace-builds": {
"main": ["src-noconflict/ace.js",
"src-noconflict/ext-language_tools.js",
"src-noconflict/theme-monokai.js",
"src-noconflict/mode-html.js",
"src-noconflict/ext-emmet.js"
]
},
"devDependencies": {
"angular-mocks": "^1.5.0"
}
}
}
我的代码看起来像这样
_editor.setTheme("ace/theme/monokai");
_editor.getSession().setMode("ace/mode/html");
_editor.getSession().setOptions({
"enableBasicAutocompletion": true,
"enableSnippets": true,
"enableLiveAutocompletion": false,
"enableEmmet": true
});
我的html(这是一个'视图')
<div class='parent' ng-controller='Main'>
<div class='wrapper'>
<div class='container' dragula='"fifth-bag"'>
<div data-type="a">A</div>
<div data-type="b">B</div>
<div data-type="c">C</div>
</div>
<div id="dragulaCopyWithSort" class='container' dragula='"fifth-bag"'>
</div>
<div ui-ace="{
onLoad: aceLoaded,
onChange: aceChanged
}">ace</div>
</div>