Customize the ui appearance of the control in Angular Numerictextbox component
21 Sep 20221 minute to read
You can change the appearance of the NumericTextBox by adding custom cssClass
to the component and enabling styles. Refer to the following example to change the appearance of the NumericTextBox.
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
// specifies the template string for the NumericTextBox component
// sets the custom css for NumericTextBox
template: `
<ejs-numerictextbox cssClass='e-style' value='10' placeholder= 'Enter Value' floatLabelType= 'Always' ></ejs-numerictextbox>
`
})
export class AppComponent {
constructor() {
}
}
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import { NumericTextBoxModule } from '@syncfusion/ej2-angular-inputs';
/**
* Module
*/
@NgModule({
imports: [
BrowserModule, NumericTextBoxModule
],
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);