I'm trying to paste list of values to text area with using textAngular directive and faced with the problem, that I cannot do that. For some reason it shows me just brackets without any errors in console.
The only one way how I can paste data to textAngular is provide path such as:
comparesing[0].description
directly in ng-model of textAngular, but I need to display list of values. So could anybody help me to find my mistake? thanks in advance.
This is my code:
angular.module("textAngularTest", ['textAngular'])
.controller('wysiwygeditor', ['$scope', 'textAngularManager', function wysiwygeditor($scope, textAngularManager) {
(function () {
$scope.data = '[{"id":11820,"occuredDate":"2016-10-26T18:23:01.000Z","title":"Log In","description":"User 123-001 logged in"},{"id":11819,"occuredDate":"2016-10-19T18:32:07.000Z","title":"Log out","description":"User has logged off"}]'
$scope.comparesing = JSON.parse($scope.data)
$scope.orightml = '<ol ng-repeat="(key, value) in comparesing"><li>{{value.description}}</li></ol>';
}());
}]);
html
<div text-angular name="Narrate items" ng-model="orightml"></div>
this is plunker with my error
- abc
- def
";` and it parsed it – Ahmad hamza Nov 01 '16 at 22:07