Formulaire de classe Angular Assignez invalide

// Template
<button [class.my-btn]="myForm.invalid">Home</button>

// Stylesheet
.my-btn { opacity: 50%; }
Banana in Transit