首页 > 解决方案 > 问题输出角表html实体

问题描述

我的数据库中有一个文本。像 {{ roll.Text }} 这样的输出问题是,有一个带有 html-entities 的输出。如果我<h2>Text</h2>的 html 中有我需要Text

我的代码:

      <script>
            angular.module('sortApp', [])
            .controller('mainController', function ($scope) {
                $scope.sortType = 'name'; // set the default sort type
                $scope.sortReverse = false;  // set the default sort order
                $scope.searchFish = '';     // set the default search/filter term

                // create the list of edit rolls
                $scope.edit = [
                    <?php
                    while($row_post = $result_post->fetch_assoc()) {
                        $plant_id = $row_post['plant_id'];
                        $titel= $row_post['name'];
                        $text = $row_post['beschreibung'];
                        $datum = $row_post['datum'];
                        $del = $row_post['del'];
                        $uid = $_SESSION['id'];
                    ?>

                    {ID: '<?php echo $plant_id ?>', Titel: '<?php echo $titel; ?>', Text: '<?php echo $text; ?>', Datum: '<?php echo date("j.m.Y", $datum) ?>',
                     Del: '<?php echo $del; ?>', UID: '<?php echo $uid ?>'},

                    <?php } ?>
                ];

            });
    </script>
<textarea class="uk-textarea"  rows="5" name="beschreibung" id="editor"  style="min-height: 150px;" required>{{ roll.Text }}</textarea>

标签: htmlangularoutputhtml-entitiesangular-sortablejs

解决方案


推荐阅读