title: text formatting with AngularJS
body: <p>I have a mysql database that stores a text value (a body of an article), that I want to display on my page. I would like to store and then display some text formatting but don't know how to do it with angular.</p>
  
  <p>I use the php PDO <code>echo json_encode</code> to output my database query results.</p>
  
  <p>So I figured I'd just insert some html markup into my text (some heading and paragraph tags), and let the browser format it, but now my browser shows the html markups as text.</p>
  
  <p>Is there an AngularJS filter to do this easily? I searched trough the documentation but was unable to find anything like it.</p>
  
  <p>I don't really want to write html markups for every single article I inted to store inside the database, but I have no idea how else to do it. Before, I just wrote a custom jQuery function that replaced line brakes with <code>&lt;br&gt;</code> and so on.</p>
  
  <p>Here's my code:</p>
  
  <p>html:</p>
  
  <pre><code>&lt;div id="full-article" ng-repeat="fArticle in fullArticle" ng-show="!feed" ng-hide="feed"&gt;
      &lt;h1&gt;{{ fArticle.title }}&lt;/h1&gt;
      &lt;h3&gt;{{ fArticle.posted | date:"dd.MM.yyyy"}}&lt;/h3&gt;
      &lt;p&gt;{{ fArticle.body }}&lt;/p&gt;
      &lt;button ng-click="backToFeed()"&gt;Back to articles&lt;/button&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>controller:</p>
  
  <pre><code>'use strict';
  
  angular.module('ptcAngularJsApp')
      .controller('ArticlesCtrl', function ($scope, $http) {
          //
  
          $scope.fullArticle = [];
          $scope.feed = true;
          $scope.message = '';
  
  
          $scope.findArticleByTitle = function(article) {
              $http.post('http://localhost/PTC_db_PHP/article_by_title.php', article.title).
                  success(function(response) {
                      $scope.fullArticle = response;
                      $scope.feed = false;
                  }). //end http post response
                  error(function(err) {
                      console.log(err);
                  }); //end http post error
          }; //end findArticleByTitle 
  
          }); //end .controller
  </code></pre>
  
  <p>I removed the parts of my code irrelevant to this question. If you need more</p>