Last active
July 5, 2016 23:59
-
-
Save nbogie/8945ff714083545a95034a099645e9e8 to your computer and use it in GitHub Desktop.
Attempted recreation of @anuteja 's problem.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Working towards a minimal demonstration of the problem. | |
//This currently works as expected :( | |
import { Component } from '@angular/core'; | |
@Component({ | |
moduleId: module.id, | |
selector: 'problem', | |
styles: [` | |
.original { color: green; } | |
.different { color: orange; } | |
`], | |
template: ` | |
<div *ngFor="let n of [1,2,10]" [ngClass]="myClass"> | |
hello world {{n}} | |
</div> | |
<button (click)="changeClass()">Change Class</button>` | |
}) | |
export class ProblemComponent { | |
myClass = "original"; | |
changeClass() { | |
this.myClass = "different"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment