title: self.context is not a function
body: <p>I am trying to call this function <code>domain</code> from my template but getting <code>self.context.article.domain is not a function</code> error. Tried looking at other answers on SO but couldn't get the issue resolved.</p>
  
  <p>Here's my component-</p>
  
  <pre><code>import { Component,Input } from '@angular/core';
  import {Article} from './Article'
  
  @Component({
    selector:'article-art',
  
    template:`&lt;div class="container"&gt;
      &lt;div class="row"&gt;
        &lt;section class="col-sm-4 col-md-4 col-xs-4 left"&gt;
          &lt;div class="value"&gt;{{article.votes}}&lt;/div&gt;
          &lt;div class="label"&gt;Points&lt;/div&gt;
        &lt;/section&gt;
        &lt;section class="col-sm-8 col-md-8 col-xs-8 right"&gt;
          &lt;a class="ui large header" href="{{ article.link }}"&gt;
            {{ article.title }}
          &lt;/a&gt;
          &lt;div class="meta"&gt;({{ article.domain() }})&lt;/div&gt;
          &lt;ul&gt;
            &lt;li&gt;&lt;a href (click)="voteUp()"&gt;&lt;i class="glyphicon glyphicon-arrow-up"&gt;&lt;/i&gt;Upvote&lt;/a&gt;&lt;/li&gt;
            &lt;li&gt;&lt;a href (click)="voteDown()"&gt;&lt;i class="glyphicon glyphicon-arrow-down"&gt;&lt;/i&gt;DownVote&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
        &lt;/section&gt;
      &lt;/div&gt;
    &lt;/div&gt;`,
    styleUrls:['src/article.cmponent.css']
  })
  
  export class ArticleComponent{
    @Input() article:Article;
  
    voteUp(){
      this.article.voteUp();
      return false;
    }
  
    voteDown(){
      this.article.voteDown();
      return false;
    }
    domain(): string {
   try {
   const link: string = this.link.split('//')[1];
   console.log(link);
   return link.split('/')[0];
   } catch (err) {
   return null;
   }
   }
  }
  </code></pre>
  
  <p>Also attaching the reproduced problem in plunker:<a href="https://plnkr.co/edit/tu7YImvsMjpWyrmjq2M2?p=preview" rel="nofollow noreferrer">https://plnkr.co/edit/tu7YImvsMjpWyrmjq2M2?p=preview</a>.
  You can see the errors in console.</p>
  
  <p>Thanks for any help that comes my way.</p>