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.
🌐
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.
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
🌐
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.
Find elsewhere
🌐
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.
🌐
GeeksforGeeks
geeksforgeeks.org › angularjs › style-binding-in-angular-8
Style Binding in Angular 8 - GeeksforGeeks
September 14, 2020 - It is very easy to give the CSS styles to HTML elements using style binding in Angular 8. Style binding is used to set a style of a view element. We can set the inline styles of an HTML element using the style binding in angular.
🌐
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
🌐
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.
🌐
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!
🌐
TutorialsPoint
tutorialspoint.com › home › angular › angular style binding
Angular - Style Binding
October 24, 2014 - 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.
🌐
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.
🌐
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.
🌐
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 …
🌐
GeeksforGeeks
geeksforgeeks.org › style-binding-in-angular-17
Style Binding in Angular 17 | GeeksforGeeks
May 14, 2024 - In Angular, creating visually appealing ... such powerful feature is Style Binding. It allows you to dynamically apply CSS styles to HTML elements based on component data or expressions....
🌐
JavaByKiran
javabykiran.com › it trends › angular › courses › conditional styling and binding - angular templates
Conditional Styling And Binding - Angular Templates
December 18, 2023 - Unlike static styling, where styles are predefined in the CSS files, style binding enables the manipulation of styles in real-time within Angular templates.In Angular, style binding is achieved using square brackets ([]) his powerful feature ...
🌐
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 › angular › angular-class-style-binding.htm
Angular - Class & Style Binding
Style binding in Angular allows you to dynamically set inline CSS styles on an HTML element based on the component's properties or template variables.