Turns out the binding of style to a string doesn't work. The solution would be to bind the background of the style.

 <div class="circle" [style.background]="color">
Answer from user1613512 on Stack Overflow
🌐
Angular
angular.dev › guide › templates › binding
Binding dynamic text, properties and attributes • Angular
Angular supports additional features for binding CSS classes and CSS style properties to elements.
Discussions

css - Angular style binding - Stack Overflow
I'm doing an Angular 8 project and I want to bind the dynamic style on HTML. I already learned some from the official document of Angular. Assuming that in my ts file colorCode: string = "#000... More on stackoverflow.com
🌐 stackoverflow.com
How to bind to css mask property in html template

Angular won't understand the location of your file in this case. Take a look at this link, it should be enough to guide you in the right path.

More on reddit.com
🌐 r/angular
1
0
August 3, 2021
There's no nice API for hooking up a Signal to a @HostBinding yet, right?
https://github.com/angular/angular/issues/53888 Host metadata for host listener and host binding is the new angular way. More on reddit.com
🌐 r/Angular2
7
9
April 9, 2024
Change my mind: The `host` metadata property is way nicer than `HostBinding`/`HostListener` decorators (if you're making heavy use of host elements)
We use the programattic approach, but use fat arrow functions for readability so they become oneliners. We also tend to use the getters and setters as little as possible, and use rxjs to reduce the amount of bindings/listeners overall. More on reddit.com
🌐 r/Angular2
10
24
March 7, 2020
🌐
Angular
v17.angular.io › guide › class-binding
Class and style binding
Angular is a platform for building mobile and desktop web applications. Join the community of millions of developers who build compelling user interfaces with Angular.
🌐
Medium
medium.com › @interviewpro › style-binding-ngstyle-in-angular-8df0bfd169d7
Style binding [ngStyle] in Angular | by InterviewPro | Medium
January 4, 2025 - Style binding in Angular is a powerful tool that allows you to dynamically adjust the inline styles of HTML elements based on the data in your component.
🌐
Pluralsight
pluralsight.com › tech insights & how-to guides › tech guides & tutorials
Attribute, Class, and Style Bindings in Angular | Pluralsight
May 2, 2025 - Learn how to use attribute, class, and style bindings in Angular to dynamically control the appearance and behavior of elements.
🌐
Tektutorialshub
tektutorialshub.com › home › angular › style binding in angular
Style binding in Angular - Tektutorialshub
March 9, 2023 - We can set the styles of a HTML element using style binding in angular. The styles added conditionally to an element, creating a dynamically styled element.
🌐
Medium
medium.com › @nixonaugustine5 › angular-style-binding-26dd5e743339
Angular Style Binding. Angular Style Binding is a way defined… | by Nixon Augustine | Medium
May 18, 2020 - Angular Style Binding Angular Style Binding is a way defined by Angular on binding style/s to an element. Angular Style can be bound in two ways — using ngClass and …
Find elsewhere
🌐
GeeksforGeeks
geeksforgeeks.org › angularjs › style-binding-in-angular-17
Style Binding in Angular 17 - GeeksforGeeks
July 23, 2025 - Style binding in Angular provides a way to dynamically set CSS styles for HTML elements. It enables you to define styles inline or conditionally based on component properties or expressions.
🌐
Dot Net Tutorials
dotnettutorials.net › home › angular style binding
Angular Style Binding with Examples - Dot Net Tutorials
January 29, 2026 - Angular Style Binding is a one-way data binding technique that allows us to dynamically set or update individual CSS style properties of an HTML element based on values or expressions defined in the component.
🌐
Angular
angular.dev › style-guide
Angular coding style guide
Both class and style bindings use a more straightforward syntax that aligns closely with standard HTML attributes.
🌐
W3Schools
w3schools.com › angular › angular_css_styling.asp
Angular Styling
Styling in Angular uses class/style bindings in templates and component-scoped CSS for maintainable, theme-friendly UIs.
🌐
Stackademic
blog.stackademic.com › data-binding-style-binding-in-angular-part-2-3754a1353dd8
Data Binding(Style Binding) in Angular | by Amit Dhiman | Stackademic
October 2, 2023 - Style binding in Angular allows you to dynamically set the inline CSS styles of HTML elements based on component properties or expressions.
🌐
DigitalOcean
digitalocean.com › community › tutorials › angular-style-binding-ngstyle-angular
Style Binding & NgStyle in Angular 2 | DigitalOcean
October 24, 2016 - Here’s how you would bind a single style value for example: <p [style.background-color]="'darkorchid'"> Quite something!
🌐
Telerik
telerik.com › blogs › angular-basics-manipulating-css-custom-properties-style-binding
Angular Basics Manipulating CSS Custom Properties Style
July 19, 2021 - Instead of implementing the code ... our component class lean. From Angular 9, style binding includes binding to CSS custom properties as well as CSS properties making it really easy to use CSS custom properties for dynamic ...
🌐
TutorialsPoint
tutorialspoint.com › home › angular › angular style binding
Angular - Style Binding
February 13, 2026 - A dynamic web application usually have dynamic styles and are set during the runtime of the application. Style binding is a special binding to bind a value to the style attribute of a HTML element dynamically.
🌐
Telerik
telerik.com › blogs › angular-basics-data-binding-part-5-style-binding
Angular Basics: Data Binding Part 5—Style Binding
November 8, 2021 - This also allows you to do inline styling dynamically. You can also put conditions on the style rules you write. Style binding was created to give you more power when designing a component in the template file. ... Start from the top: Angular Basics: Data Binding Part 1—Interpolation.
🌐
YouTube
youtube.com › watch
18. Class and Style Binding in Angular - YouTube
In Angular, you can use class and style bindings to add and remove CSS class names from an element's class attribute and to set styles dynamically.----------...
Published   August 5, 2022
🌐
Ultimate Courses
ultimatecourses.com › blog › using-ngstyle-in-angular-for-dynamic-styling
Using ngStyle in Angular for dynamic styling - Ultimate Courses
This is fine for one-off use cases, though you’d be likely better off using a class to apply a style, but the values remain static. When dealing with Angular, it’s likely you’ll need to apply a dynamic inline style that changes based on the state of your data structure. That’s where property binding to the style attribute comes in.
🌐
Angular
v17.angular.io › guide › attribute-binding
Attribute binding
Angular is a platform for building mobile and desktop web applications. Join the community of millions of developers who build compelling user interfaces with Angular.