I'm following this Angular 7 tutorial. But my class bindings throws exception:
I created the CSS class as
.test-regular
{
color:purple;
font-family: 'Courier New', Courier, monospace
}
and in the customer-component.component.ts
file I created a property
public regularClass="test-regular";
and in the html template I'm using it as
<h2 [class]="regularClass">Hiya Everyone</h2>
This is how it's suggested in the tutorial. Am I missing anything?
inside a
, which is invalid HTML.
– JB Nizet Dec 25 '18 at 13:42tags, the exception was thrown as nesting of
is not allowed.
– Raida Adn Dec 25 '18 at 13:54