Guest User

Untitled

a guest
Jan 24th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. <div class="table">
  2. <columns *ngFor="let lampValue of getLampScenarioArray(); let i = index"
  3. index="{{i}}" value="{{lampValue}}"></columns>
  4. </div>
  5.  
  6. <div class="rows" *ngFor="let val of getValueAsArray(); let i = index" class="level" (click)="changeValue(15 - i)"
  7. [ngClass]="{'on': val==1}">
  8.  
  9. {{15 - i}}
  10. </div>
  11.  
  12. .level.on {
  13. background-color: #79acff;
  14. }
  15.  
  16. .level:hover {
  17. background-color: #83b8ff;
  18. }
  19. .level.on:hover {
  20. background-color: #ffff00 ;
  21. }
  22.  
  23. import {Directive, ElementRef, HostListener} from '@angular/core';
  24.  
  25. @Directive({
  26. selector: '[myHighlight]'
  27. })
  28. export class TableDirective {
  29.  
  30. constructor(el: ElementRef) {
  31. el.nativeElement.divIcon().onMouseEnter();
  32. }
  33.  
  34. @HostListener("mouseenter") onMouseEnter() {
  35.  
  36. }
  37.  
  38. }
Add Comment
Please, Sign In to add comment