angular-ui / ui-ace

This directive allows you to add ACE editor elements.
http://angular-ui.github.io/ui-ace
MIT License
578 stars 172 forks source link

ng-readonly doesn't work with a variable #144

Open thatkookooguy opened 8 years ago

thatkookooguy commented 8 years ago

Tried using the ng-readonly attribute.

here's my code:

main controller:

var vm = this;
// Init
vm.code = '';
vm.settings = {
  isReadOnly: true
};

My ui-ace directive

<div class="editor"
     ui-ace="main.editorOptions"
     ng-model="main.code"
     ng-readonly="main.settings.isReadOnly"></div>

even though the setting is set for true in initialization, it doesn't effect the read only state of the ace editor.

Am I missing something?