I am using Angular2 and its ngFor. I want to add class to odd and to even rows, so I can separate them visually by color.
Here is my code (which does not work really
Your first code example is working fine Plunker example
@Component({ selector: 'my-app', styles: [` .even { color: red; } .odd { color: green; } `], template: ` Hello {{name}} {{meeting}} ` }) export class App { meetingList = ['a', 'b', 'c']; }