0

textAngular ディレクティブを使用して値のリストをテキスト領域に貼り付けようとしていますが、それができないという問題に直面しました。何らかの理由で、コンソールにエラーなしで括弧だけが表示されます。

データを textAngular に貼り付ける唯一の方法は、次のようなパスを提供することです。

comparesing[0].descriptiontextAngular の ng-model で直接、値のリストを表示する必要があります。それで、誰かが私の間違いを見つけるのを手伝ってくれませんか? 前もって感謝します。

これは私のコードです:

 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>

これは私のエラーでプランカーです

4

0 に答える 0