title: How can I write a custom function like $any() (type cast function)?
body: <p>the <a href="https://angular.io/guide/template-expression-operators#any-type-cast-function" rel="nofollow noreferrer">$any() function</a> can be used into template, eg.:</p>
  <pre><code>&lt;p&gt;The item's undeclared best by date is: {{$any(item).bestByDate}}&lt;/p&gt;
  </code></pre>
  <p>I want implement my custom function <code>$myAny()</code>, eg.:</p>
  <pre><code>&lt;p&gt;The item's undeclared best by date is: {{$myAny(item).bestByDate}}&lt;/p&gt;
  </code></pre>
  <p>How expose a function &quot;globally&quot; into every components template?</p>