mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
add e2e test for SVG template example fix template syntax example app - linting errors - runtime exceptions - template type errors - deprecated type casting - deprecated currency pipe example Relates to #30559 PR Close #31356
17 lines
430 B
TypeScript
17 lines
430 B
TypeScript
import { Component } from '@angular/core';
|
|
|
|
@Component({
|
|
selector: 'app-svg',
|
|
templateUrl: './svg.component.svg',
|
|
styleUrls: ['./svg.component.css']
|
|
})
|
|
export class SvgComponent {
|
|
fillColor = 'rgb(255, 0, 0)';
|
|
|
|
changeColor() {
|
|
const r = Math.floor(Math.random() * 256);
|
|
const g = Math.floor(Math.random() * 256);
|
|
const b = Math.floor(Math.random() * 256);
|
|
this.fillColor = `rgb(${r}, ${g}, ${b})`;
|
|
}
|
|
}
|