Why won't Angular's renderer2 apply linear-gradient CSS in this code snippet? Can anyone provide insights?
export class AppComponent implements OnInit {
constructor(private renderer: Renderer2, private elementRef: ElementRef) {}
public ngOnInit(): void {
this.renderer.setStyle(
this.elementRef.nativeElement,
"background",
"linear-gradient(rgba(253,92,99,1), rgba(144,255,0,1) 30%);"
// "red" // works, so does this rule in CSS
);
}
}
Check out the stackblitz for a reproducible example.