Using constant inside HTML file
<p>I have following constants.js code:</p>

<pre><code>var app = angular.module('myApp');

app.constant('globalConstant', {
    TYPE: {
        0: 'Good',
        1: 'Bad'
    }
});
</code></pre>

<p>My list.js:</p>

<pre><code>app.controller('myCtrl', 
['$scope', '$rootScope', 'globalConstant', 
function ($scope, $rootScope, globalConstant) {
    $scope.type = globalConstant.TYPE;
}]);
</code></pre>

<p>My list.jade:</p>

<pre><code>div {{type[{{data.type}}]}} //data.type will be either 0 or 1
</code></pre>

<p>However it throws me error:</p>

<blockquote>
  <p>Syntax Error: Token '{' invalid key at column 16 of the expression
  [type[{{data.type] starting at
  [{data.type].</p>
</blockquote>

<p>What is the correct way to use the constant inside my HTML file?</p>