title: Error "TypeError: ... is not a function" when trying to use a component function in template
body: <p>I have a component as following and I am trying to provide my svg viewBox dimension dynamically, injected from my bootstrap in main.ts.</p>
  
  <pre><code>import {Component} from 'angular2/core';
  import {CircleComponent} from './circle.component';
  import {Circles} from './circles.service';
  
  @Component({
      selector: 'my-app',
      styleUrls: ['./app/app.component.css'],
      directives: [CircleComponent],
      providers: [Circles],    
      template: `
          &lt;svg [attr.viewBox]="getViewBox()" preserveAspectRatio="xMidYMid meet"&gt;
              &lt;svg:g my-circle *ngFor="#circle of circles.circles" [circle]="circle" /&gt;
          &lt;/svg&gt;
      `
  })
  export class AppComponent{
      static parameters = [Circles, 'canvasWidth', 'canvasHeight'];
  
      constructor(circles: Circles, canvasWidth: Number, canvasHeight: Number) {
          this.circles = circles;
          this.width = canvasWidth;
          this.height = canvasHeight;
      }    
  
      function getViewBox(): String {
          return `0 0 ${this.width} ${this.height}`;
      }
  }
  </code></pre>
  
  <p>My main.ts</p>
  
  <pre><code>import {provide}        from 'angular2/core';
  import {bootstrap}      from 'angular2/platform/browser'
  import {AppComponent}   from './app.component'
  
  bootstrap(AppComponent, [
      provide('canvasWidth', {useValue: 900}),
      provide('canvasHeight', {useValue: 300})
  ]);
  </code></pre>
  
  <p>And the exception I get</p>
  
  <blockquote>
    <p>EXCEPTION: TypeError: l_context.getViewBox is not a function in
    [getViewBox() in AppComponent@1:13]</p>
  </blockquote>
  
  <p>I'm not sure it's a good way to do this thing, but this information is needed elsewhere in my circles.service. One thing I don't like though is that I cannot  specify the Number type so I have to define <em>static parameters = [Circles, 'canvasWidth', 'canvasHeight'];</em> in AppComponent. </p>