I have an Angular component ("new-form"), which has a slide toggle from Angular Material. The slide toggle renders on the client, but nothing happens when I click on it.
I've installed angular material, and it exists in my package.json (^17.0.4). Please explain why the slide toggle is not working.
Here is new-form.component.html:
<mat-slide-toggle>Slide me!</mat-slide-toggle>
And, here is new-form.component.ts:
import {Component} from '@angular/core';
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
@Component({
selector: 'app-new-form',
templateUrl: 'new-form.component.html',
standalone: true,
imports: [MatSlideToggleModule],
})
export class NewFormComponent {}
You missed adding the CSS in
global-styles.cssstackblitz