title: Angular 2 - 'get' accessor must return a value
body: <p>I'm a newbie to Angular 2. Currently, I'm trying to build slide carousel component in Angular 2 and I'm trying to use ng2-bootstrap carousel from <a href="https://valor-software.com/ng2-bootstrap/#/carousel" rel="nofollow">here</a>.</p>
  
  <p>This is what I have so far in my <strong>carousel.component.ts</strong>:</p>
  
  <pre><code>import {Component, OnInit, OnDestroy, ViewEncapsulation, Input, HostBinding} from '@angular/core';
  import { Router } from '@angular/router';
  import {Project} from './project';
  import {ProjectService} from './project.service';
  import { CarouselModule } from 'ng2-bootstrap/components/carousel';
  
  @Component({
      selector: 'carousel',
      encapsulation: ViewEncapsulation.None,
      providers: [ProjectService],
      templateUrl: 'app/carousel.html'
   })
    //Template for the tag
  
  export class CarouselComponent implements OnInit {
    errorMessage: string;
      projects: Project[];
    selectedProject: Project;
    private start = false;
      public length = Number;
    @Input() private noWrap:boolean;
    @Input() private noPause:boolean;
    @Input() private noTransition:boolean;
    @Input() public get interval():number {};
  
      constructor(
      private router: Router,
      private projectService: ProjectService){
       }
  
     getProjects() {
        this.projectService.getProjects()
          .subscribe(
                projects =&gt; this.projects = projects,
                error =&gt;  this.errorMessage = &lt;any&gt;error
                );
        }
  
    ngOnInit(){
          this.getProjects();
      }
  
  }
  
  // class Slide implements OnInit, OnDestroy
  @Component({
    selector: 'slide'
  })
  export class SlideComponent {
    @Input() public index:number;
  
    @HostBinding('class.active')
    @Input() public active:boolean;
  
    @HostBinding('class.item')
    @HostBinding('class.carousel-item')
    private addClass:boolean = true;
  }
  </code></pre>
  
  <p>But when I run it, I get an error saying <code>app/carousel.component.ts(24,23): error TS2378: A 'get' accessor must return a value.</code> Which I'm not sure how to correct, as I basically just copied the solution from the tutorial. </p>
  
  <p>The value for interval is given in file <strong>app.component.ts</strong>
  like:</p>
  
  <pre><code>public interval:number = 5000;
      public noWrapSlides:boolean = false;
      public slides:Array&lt;any&gt; = [];
  </code></pre>
  
  <p>I'm using Angular 2 2.0.0-rc.4
  Any suggestions?</p>