<ejs-textbox id="textarea" #default placeholder="Enter your value" cssClass="e-outline" floatLabelType="Auto">
</ejs-textbox>
|
[component.html]
<ejs-textbox id="textarea" #default placeholder="Enter your value" [cssClass]="customClass" [floatLabelType]="LabelType"></ejs-textbox>
<ejs-textbox id="textarea1" #default placeholder="Enter your value" [cssClass]="customClass" [floatLabelType]="LabelType"></ejs-textbox>
<ejs-textbox id="textarea2" #default placeholder="Enter your value" [cssClass]="customClass" [floatLabelType]="LabelType"></ejs-textbox>
<ejs-textbox id="textarea3" #default placeholder="Enter your value" [cssClass]="customClass" [floatLabelType]="LabelType"></ejs-textbox>
<ejs-textbox id="textarea4" #default placeholder="Enter your value" [cssClass]="customClass" [floatLabelType]="LabelType"></ejs-textbox>
[component.ts]
public customClass: string = "e-outline";
public LabelType: string = "Auto";
|
[component.html]
<ejs-textbox placeholder="Enter your value" ></ejs-textbox>
<ejs-textbox placeholder="Enter your value" ></ejs-textbox>
<ejs-textbox placeholder="Enter your value" ></ejs-textbox>
<ejs-textbox placeholder="Enter your value" ></ejs-textbox>
<ejs-textbox placeholder="Enter your value" ></ejs-textbox>
[component.ts]
ngAfterViewInit() {
let textboxElements = document.querySelectorAll("ejs-textbox");
for (let i = 0; i < textboxElements.length; i++) {
(textboxElements[i] as any).ej2_instances[0].floatLabelType = "Auto";
(textboxElements[i] as any).ej2_instances[0].cssClass = "e-outline";
}
}
|