title: How do I display on the frontend the result of a method in angular 2
body: <p>I had the following code inside my <code>.component.html</code> file:</p>
  
  <pre><code>&lt;div class="someContainer"&gt;
         &lt;div class="text--bold"&gt;DDisplay this please:&lt;/div&gt;
         &lt;div&gt;{{ myObject.date ? '2 Jun' : 'Now' }}&lt;/div&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>This worked fina and displayed the date correctly. However I dont want to diplay the hardcoded value '2nd June' I want to display the result of a method:</p>
  
  <pre><code> &lt;div&gt;{{ myObject.date ? myObject.findDate(someParam) | date:'d LLL' : 'Now' }}&lt;/div&gt;
  </code></pre>
  
  <p>However, this line does not compile. It says : Expected.</p>