I am using the TextAngular editor within an ng-repeat loop.
Within the HTML
<ul ng-repeat="lecture in section.lectures">
<div class="col-md-12 article-show" >
<form ng-submit="lecture_content('article', $index + 1, lecture.id)" style="width:100%;">
<div text-angular id="lecture_text{{lecture.id}}" ng-model="htmlVariable[lecture.id]" style="width:100%;" ></div>
<button type="submit" data-toggle="modal" data-target="#stext" class="sub-sub-section-add">Submit</button>
</form>
</div>
</ul>
Within the Controller
$scope.lecture_content = function(type, value, x) {
if (type == 'article') {
console.log($scope.htmlVariable[lecture.id]);
var lecture_description = document.getElementById('lecture_text' + x).value;
}
}
I believe the issue lies within the controller. How can I access the value in the text editor? Thank you in advance.