Import { component } from '@angular/core';
Change font style angular. Web here is the ng style documentation: In this tutorial, we learn how to use the ngstyle with an example. The documentation provides an example for sass:
The styles in this file apply only to its component. The angular ngstyle directive allows us to set the many inline style of a html element using an expression. The angular cli gives each component its own file for styles.
Web 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. In the src directory, the styles in this file apply to your entire application unless you specify styles at the component level. Open your style.css file and include the font by referencing a path.
Url ('src/font/smooch.ttf');} then just changed the font family of the tags h1 and h2 in the src/index.html file: Web how do i change the font of the whole angular app? Add this, at the beginning of your script (before initializing the app)
Create a new folder called fonts inside the assets folder. Using the style attribute of the html element. Style property binding inline styles can be applied using square brackets and referencing the style attribute.
You can use ngclass for that. Web so, include this line in your index.html file, linking to some external font: Ago can't you just put in on body?