title: getting error Index signature of object type implicitly has an 'any' type
body: <p>I am using Angular Version 2.1.0 and writing one of service to load a component dynamically.</p>
  
  <p>I an getting below error, how to resolve it?</p>
  
  <p><strong>Error TS7017  Index signature of object type implicitly has an 'any' type.</strong></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import { Injectable, ComponentFactoryResolver, ApplicationRef, ElementRef, ViewContainerRef } from '@angular/core';
  
  import { SpinnerComponent } from '../components/blockui/blockui.component';
  
  
  @Injectable()
  export class SpinnerService {
      spinnerComp: ViewContainerRef;
      constructor(private componentLoader: ComponentFactoryResolver, private appRef: ApplicationRef) { }
  
      public start() {
          //error in this line?
          let elementRef: ElementRef = this.appRef['_rootComponents'][0].location;
  
          return this.startInside(elementRef, null);
      }
  
      public startInside(elementRef: ElementRef, anchorName: string) {
  
          let spinnerRef = (!anchorName) ?
              this.componentLoader.resolveComponentFactory.call(SpinnerComponent, elementRef) :
              this.componentLoader.resolveComponentFactory.call(SpinnerComponent, elementRef, anchorName);
  
          spinnerRef.then((compRef: ViewContainerRef) =&gt; {
              this.spinnerComp = compRef;
          });
      }
  
      public stop() {
          if (this.spinnerComp) {
              this.spinnerComp.detach();
          }
      }
  }</code></pre>
  </div>
  </div>
  </p>