title: Angular View with *ngFor Not Rendering Data
body: <p>I'm new to Angular, but familiar with Javascript.</p>
  
  <p>I'm setting up a CRUD for a demo and can't get this list to loop over data returned from our API.</p>
  
  <p>The data is loading fine, I can see it in the console. But the <code>*ngFor</code> below does not render any <code>&lt;li&gt;</code>s.</p>
  
  <p>pages.component.html:</p>
  
  <pre><code>&lt;div class="row"&gt;
      &lt;div class="col-sm-4"&gt;
          &lt;p&gt;Pages&lt;/p&gt;
          &lt;ul&gt;
              &lt;li *ngFor="let page of pages"&gt;
                  {{page.Name}}
              &lt;/li&gt;
              &lt;li&gt;this shows up.&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>pages.component.ts:</p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  import { PageService } from '../page.service';
  import { Page } from '../page';
  
  @Component({
    selector: 'app-pages',
    templateUrl: './pages.component.html',
    styleUrls: ['./pages.component.css']
  })
  export class PagesComponent implements OnInit {
      pages: Page[];
  
      getPages(): void {
          this.pageService.all().subscribe(function(pages) {
              console.log(pages);
              this.pages = pages;
          }
      }
  
      constructor(private pageService: PageService) { }
  
      ngOnInit() {
          this.getPages();
      }
  }
  </code></pre>
  
  <p>Like I said, the data shows up in the console, so I think it must be in the view.</p>