title: How to style each element of ngFor individually based on its value?
body: <p>I have a console on the screen that I log things to. The component looks like this.</p>
  
  <pre><code>export class AppComponent { logs: string[]; ... }
  
  &lt;div *ngFor="let log of logs" class="log-type-a"&gt;{{log}}&lt;/div&gt;
  </code></pre>
  
  <p>I'd like to set a class on each of the DIVs dynamically. At the moment, each of those is <em>log-type-a</em> but I'd prefer it to be <em>log-type-b</em> when the string contains a certain value (e.g. it starts with "b", so that the class would be <em>log-type-<strong>first_char_of_log</em></strong>.</p>
  
  <p>I'm not sure what to google for to being with. I've tried horsing around with <a href="https://angular.io/api/common/NgClass" rel="nofollow noreferrer"><em>ngClass</em></a> but failed due to ignorance and uncertainty on how.</p>