Angular UI Components Documentation
The Angular FormattedInput enables users to format numbers in various numeric formats. This guide adds the Angular FormattedInput (jqxFormattedInput) to an app, then shows how to set its options, handle its events and call its methods.
jqwidgets-ngjqwidgets-ng/jqxformattedinput 
In an Angular project (to start one, see Getting started with Angular), add the package with the Angular CLI. It asks for a theme and adds the styles to angular.json:
ng add jqwidgets-ng
Components are standalone: add jqxFormattedInputModule to the imports of the component that uses it.
import { Component } from '@angular/core';
import { jqxFormattedInputModule } from 'jqwidgets-ng/jqxformattedinput';
@Component({
selector: 'app-root',
imports: [jqxFormattedInputModule],
templateUrl: './app.html'
})
export class App {}
The source of the live Default Functionality demo.
<jqxFormattedInput
[width]="250" [height]="25" [radix]="'decimal'"
[value]="15" [spinButtons]="true" [dropDown]="true">
</jqxFormattedInput>
import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { jqxFormattedInputModule } from 'jqwidgets-ng/jqxformattedinput';
@Component({
imports: [CommonModule, FormsModule, jqxFormattedInputModule],
selector: 'app-root',
templateUrl: './app.html'
})
export class App {}
Options are inputs, bound with [name]="value".
Events are outputs named on plus the event name with a capital first letter. For example, change: This event is triggered when the value is changed.
<jqxFormattedInput (onChange)="onChange($event)"></jqxFormattedInput>
onChange(event: any): void {
console.log(event.args);
}
Get the component with a signal query and call its methods. For example, val: Sets or gets the value.
<jqxFormattedInput #myFormattedInput></jqxFormattedInput>
import { Component, viewChild } from '@angular/core';
import { jqxFormattedInputModule, jqxFormattedInputComponent } from 'jqwidgets-ng/jqxformattedinput';
@Component({
selector: 'app-root',
imports: [jqxFormattedInputModule],
templateUrl: './app.html'
})
export class App {
readonly myFormattedInput = viewChild.required<jqxFormattedInputComponent>('myFormattedInput');
run(): void {
const value = this.myFormattedInput().val();
console.log(value);
}
}