title: Array in NgClass with method call and variable
body: <p>I want to use <code>[ngClass]</code> with a method call that returns an object like <code>{currentWeek: true}</code> and I want to add the var <code>week.state</code> that can have the value <code>rejected</code>.</p>
  
  <p>I want that the HTML looks like this: <code>&lt;div class="currentWeek rejected"&gt;&lt;/div&gt;</code> but when I use it I get this error:</p>
  
  <p><code>Error in ./FlexCalendar class FlexCalendar - inline template:29:13 caused by: NgClass can only toggle CSS classes expressed as strings, got [object Object]</code></p>
  
  <p>How can I combine a method call and a variable into the ngClass? Something like <code>[ngClass]=[setWeekClasses(week), week.state]</code></p>
  
  <pre><code>setWeekClasses(week: Week): Object {
      let state: string = this.state(week.state);
      return {
          'currentWeek': week.weekNumber === this.selectedDate.getWeekNumber(),
          [week.state]: true,
      };
  }
  </code></pre>