title: Set a default value when ng-repeat finds a null or undefined in angularjs
body: <p>I am fairly new to AngularJS and I am trying to have my ng-repeat set a default value when a null is found. I tried this solution which I found on another SO page,</p>
  
  <pre><code>&lt;div class="col-sm-12" ng-repeat="data in dataNames"&gt;
      {{data.name || '&lt;b&gt;NONE&lt;/b&gt;'}}
  &lt;/div&gt;
  </code></pre>
  
  <p>However when I add in the NONE text it is just displaying the whole line as plain text and it appears angular is not evaluating it.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I am trying to call this filter now and use $sce to allow me to return html. Here is the filter</p>
  
  <pre><code>require(["app", "angular"], function(app, angular) {
      app.filter("default", function ($sce) {
          return function (input, def) { 
              return $sce.trustAsHtml(!!input ? input : '&lt;b&gt;' + def + '&lt;/b&gt;');
          };
      });
  });
  </code></pre>
  
  <p>And here is how I am calling it</p>
  
  <pre><code>{{ name | default: 'NONE' }}
  </code></pre>
  
  <p>It is calling the function and evaluating correctly, but it is displaying the b tags as plain text instead of html. Am I not using $sce correctly maybe?</p>