ui-codemirror needs CodeMirror to work... (o rly?)
gajmani opened this issue · 3 comments
I am trying to integrate codeMirror with angularjs, Added "UI.Codemirror" module as a dependency to application module.
And then using into my template, but I see the below error in browser console.
"ui-codemirror needs CodeMirror to work... (o rly?)"
ui-codemirror needs CodeMirror to work... (o rly?)"
Means that UI.Codemirror couldn't find CodeMirror in the global space
(ref. https://github.com/angular-ui/ui-codemirror/blob/master/src/ui-codemirror.js#L21 )
Yes you need to manually include codemirror before running UI.Codemirror directives
Ok, I was injecting UI.Codemirror dependency using RequireJS & I missed to export it in Shim. After exporting it in Shim, I also initialize "CodeMirror" to be global and It solves my problem. Thanks,
You are welcome