Set the disabled state in Angular Button component
27 Apr 20241 minute to read
Button component can be enabled/disabled by giving disabled
property. To disable Button component,
the disabled
property can be set as true
.
The following example demonstrates button in disabled
state.
import { NgModule } from '@angular/core'
import { BrowserModule } from '@angular/platform-browser'
import { ButtonModule } from '@syncfusion/ej2-angular-buttons'
import { enableRipple } from '@syncfusion/ej2-base'
import { Component } from '@angular/core';
@Component({
imports: [
ButtonModule
],
standalone: true,
selector: 'app-root',
template: `<div class="e-section-control">
<button ejs-button [disabled]="true">Disabled</button></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));