angular icon indicating copy to clipboard operation
angular copied to clipboard

Flag conflicting class attribute mutations

Open Tomucha opened this issue 6 years ago • 2 comments

I have this element in my template:

<div class="alert {{colorClass}} margin--bottom" [class.border]="type == 'info'" *ngIf="open">...

Let's put aside it's not especially elegant :-) Class "border" never shows up, even when the condition is true. When I remove "colorClass" class expression:

<div class="alert margin--bottom" [class.border]="type == 'info'" *ngIf="open"> ...

It works.

Please either:

  • fix it
  • fail during the build, not in runtime

Thanks!

  • Dart VM version: 2.0.0-dev.69.3 (Wed Jul 25 17:21:20 2018 +0200) on "macos_x64"
  • angular 5.0.0-beta+2
  • MacOS, Chrome

Tomucha avatar Jul 31 '18 07:07 Tomucha

Code is not shown?

zoechi avatar Jul 31 '18 09:07 zoechi

Thanks! Unfortunately it won't make it in 5.0, but we could make it a warning in 5.1.

matanlurey avatar Jul 31 '18 23:07 matanlurey