在AngularJS 1.X中使用Monaco Editor 1.X
问题描述:
由于this problem,我试图使用另一个基于JavaScript的源代码编辑器,而不是CodeMirror和Ace,它可以与AngularJS 1.X
一起使用。我当时正在调查Monaco Editor。在AngularJS 1.X中使用Monaco Editor 1.X
我可以很好地运行this sample。但我不知道如何使它与AngularJS 1.X协同工作。
例如,我要绑定ng-if
,ng-model
和ng-change
到编辑器,以决定何时以及如何显示,并运行一个功能,如果有任何变化。随着ui-codemirror,我们可以用一个指令写:
<textarea ng-if="condition" ng-change="change(content)" ng-model="content" ui-codemirror="{ mode: 'application/json' }"></textarea>
因此,没有人知道是否有这样的ui-
指令摩纳哥编辑器?有没有什么解决方法可以在角度框架内实现相同的功能?