So I am working on a new site in AngularJS, and loving it!
I have encountered a problem, however. I am trying to add a jQuery plugin called 'Redactor' to my textareas, but I think what is happening is when I initialise the plugin, it replaces the textarea element. The reason this is problematic, is because I have set an 'ng-model' attribute to the text area, like so:
I am using AngularJS UI to pickup the focus event, and then execute the following code upon focus of the text
$scope.addRedactor = function() {
$('.redactor').redactor();
});
Now I can't seem to get the value of the textarea, because when I try and access the ng-model 'response', it comes up as undefined.
Is there a way I can bind an ng-model attribute to the textarea AFTER it has been affected by Redactor? Else, is there another way I should be getting the textarea's value?