How to get length of array in template syntax
<p>I am trying to evaluate the below in template syntax which is an array:</p>

<pre><code>FAIL 
{{ cols.length }}
</code></pre>

<p>I get the below error.  </p>

<pre><code>platform-browser.umd.js:1900 ORIGINAL EXCEPTION: TypeError: Cannot read property 'length' of undefined
</code></pre>

<p>But I do iterate so I know that portion works:</p>

<pre><code>      SUCCESS
     &lt;th *ngFor="let h of cols"&gt; 
        {{h}}
      &lt;/th&gt;
</code></pre>