title: Cannot read property 'text' of undefined in Angular 5
body: <p>I created a question component. In that component I put some hard-coded questions. When I try to run the application, it shows text undefined.</p>
  
  <p>Here is my component:</p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  
  @Component({
  selector: 'app-question-list',
  templateUrl: './question-list.component.html',
  styleUrls: ['./question-list.component.css']
  })
  export class QuestionListComponent implements OnInit {
  questions: Object[];
  constructor() {
  this.questions = [
    {
      text: 'What is your name?',
      answer: 'My name is Saeef'
    },
    {
      text: 'What is your favorite color?',
      answer: 'My favorite color is blue'
  
   ];
   }
  
   ngOnInit() {
   }
  
   }
  </code></pre>
  
  <p>My HTML: </p>
  
  <pre><code>&lt;div class="question" *ngFor let question of questions"&gt;
  &lt;div class="card"&gt;
      &lt;div class="card-header"&gt;
          {{ question.text }}
      &lt;/div&gt;
      &lt;div class="card-block"&gt;
          &lt;p class="card-text"&gt;{{ question.answer }}&lt;/p&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>