Search results

Set the Disabled State

Disable the TextBox by adding the e-disabled to the input parent element and set disabled attribute to the input element.

Source
Preview
app.component.ts
app.module.ts
main.ts
import { Component } from '@angular/core';

@Component({
    selector: 'app-root',
    template: `<div class="wrap">
                <input class="e-input" type="text"  placeholder="Enter Name" disabled />
                <div class="e-float-input e-disabled">
                    <input type='text' required disabled/>
                    <span class="e-float-line"></span>
                    <label class="e-float-text">Enter Name</label>
                </div>
              </div>`
})

export class AppComponent {}
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';

/**
 * Module
 */
@NgModule({
    imports: [
        BrowserModule
    ],
    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);