Set the read only TextBox in Angular TextBox component

26 Oct 20241 minute to read

You can make the TextBox as read-only by setting the readonly property to the TextBoxComponent.

import { Component } from '@angular/core';
import { TextBoxModule } from '@syncfusion/ej2-angular-inputs';

@Component({
imports: [
        TextBoxModule
    ],


standalone: true,
    selector: 'app-root',
    template: `<div class="wrap">
                <ejs-textbox placeholder="Enter Name" value="John" [readonly]="true"> </ejs-textbox>
                <ejs-textbox placeholder="Enter Name" floatLabelType="Auto" [readonly]="true"></ejs-textbox>
              </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));