ich Angular bin mit und in dem app.component.ts würde Ich mag eine Funktion erstellen, die eine CSS-Klasse zu einem div
fügt hinzu, die eine Klasse enthält:eine Funktion erstellen, die hinzuzufügen ist eine CSS-Klasse
Zum Beispiel:
<div class="mydiv">
Another class will be injected to this div's class
</div>
Also, wenn ich eine Funktion erstellen:
myfunction() {
//Code here to add the class to the div in typescript
}
Wie mache ich es in Maschinenschrift?
Das gleiche wie Sie es in JavaScript, afaik tun. –