Having trouble getting help?
Contact Support
Contact Support
Set disabled state in Angular Switch component
14 Feb 20251 minute to read
Switch can be disabled by setting the disabled
property to true
.
The following example illustrates how to disable support in Switch component.
import { NgModule } from '@angular/core'
import { BrowserModule } from '@angular/platform-browser'
import { SwitchModule } from '@syncfusion/ej2-angular-buttons'
import { enableRipple } from '@syncfusion/ej2-base'
import { Component } from '@angular/core';
@Component({
imports: [
SwitchModule
],
standalone: true,
selector: 'app-root',
template: `<div class="e-section-control">
<ejs-switch [disabled]="true"></ejs-switch></div>`
})
export class AppComponent {}
import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import 'zone.js';
bootstrapApplication(AppComponent).catch((err) => console.error(err));