Set the disabled state in Angular Button component

14 Nov 20221 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 { Component } from '@angular/core';

@Component({
    selector: 'app-root',
    template:  `<button ejs-button [disabled]="true">Disabled</button>`
})

export class AppComponent { }
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { ButtonModule } from '@syncfusion/ej2-angular-buttons';
import { AppComponent } from './app.component';
import { enableRipple } from '@syncfusion/ej2-base';

enableRipple(true);

/**
 * Module
 */
@NgModule({
    imports: [
        BrowserModule,
        ButtonModule
    ],
    declarations: [AppComponent],
    bootstrap: [AppComponent]
})
export class AppModule { }
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core';
import { AppModule } from './app.module';

enableProdMode();
platformBrowserDynamic().bootstrapModule(AppModule);