Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

Using ng-if along with ui-tinymce causes the ngModel controller not to be found #241

Closed
zhouzi opened this issue Mar 21, 2016 · 0 comments
Closed
Labels
Milestone

Comments

@zhouzi
Copy link
Contributor

zhouzi commented Mar 21, 2016

The priority of ui-tinymce being 999, it's higher than ng-if and gets compiled before the ngModel is available. It causes a Controller 'ngModel', required by directive 'uiTinymce', can't be found! to be thrown:

<textarea ng-if="ctrl.show" ng-model="ctrl.input" ui-tinymce></textarea>

Here is a fiddle.

There are two possible solutions:

  1. Decrease the priority to, e.g, 500: fiddle
  2. Apply ng-if to a parent element: fiddle

Let me know what you think and I'll eventually submit a PR :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants