How to make input appear as sentence case based on typing using Angular 8 ? Last Updated : 17 Dec, 2020 Comments Improve Suggest changes Like Article Like Report In this example, we will see how to make input appear sentence case based on typing using angular8. Approach: First, we need to write code for the input type in the HTML file.After writing the input type as text in HTML, using two-way binding i.e., using ngModel we can bind the value of the input field.Now in order to make the input field sentence case, we can use the ngModelChange event to manipulate the value according to the requirement.Make sure you are importing 'FormsModule' from '@angular/forms'.After importing the module now we need to implement the function in the ts file where we can modify the input value using regex according to the requirement like sentence case and can display in the input field.Once the above steps are done, start, or serve the project to run. Code Implementation: app.component.ts: JavaScript import { Component } from '@angular/core'; @Component({ selector: 'my-app', templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) export class AppComponent { inputvalue = '' changeToSentenceCase(event) { this.inputvalue = event.replace(/\b\w/g, event => event.toLocaleUpperCase()); } } app.component.html: HTML <p>Type in textbox to make as sentence case.</p> <input type='text' [(ngModel)]="inputvalue" (ngModelChange)="changeToSentenceCase($event)"> app.module.ts: JavaScript import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { FormsModule } from '@angular/forms'; import { AppComponent } from './app.component'; @NgModule({ imports: [BrowserModule, FormsModule], declarations: [AppComponent], bootstrap: [AppComponent] }) export class AppModule { } Output: Comment More infoAdvertise with us Next Article How to make input appear as sentence case based on typing using Angular 8 ? B bunnyram19 Follow Improve Article Tags : Web Technologies AngularJS AngularJS-Misc Similar Reads How to Filter an Array based on user input in AngularJS ? AngularJS is a JavaScript-based framework. It can be used by adding it to an HTML page using a <script> tag. AngularJS helps in extending the HTML attributes with the help of directives and binding of data to the HTML with expressions. Angular filters can be added in AngularJS to format data. 3 min read How to change Input characters to Upper Case while typing using CSS/jQuery ? Given an input text area and the task is to transform the lowercase characters into uppercase characters while taking input from user. It can be done using CSS or JavaScript. The first approach uses CSS transform property and the second approach uses JavaScript to convert the lowercase character to 2 min read How to use Pipes within ngModel on input Element in Angular ? The ngModel directive is a directive that is used to bind the values of the HTML controls (input, select, and textarea) or any custom form controls, and stores the required user value in a variable and we can use that variable whenever we require that value. In this article, we will learn about Usin 3 min read How to make sure clients have enough words in textarea by using angularjs in order to disable/enable a button? The Task here is to make sure that the user enters enough words in the Textarea. The button will be enabled or disabled on the basis of the word count entered by the client or user. Here the word limit will be set by admin of the project or Application. If word count lies between the parameter set b 4 min read How to truncate the text using Angular Pipe and Slice ? Angular Pipe and Slice can be used to manipulate or transform the data in a specific format. Angular Pipes can be utilized to format or transform data directly before displaying it in the Angular template. The Slice is a built-in method in JavaScript that enables the users to extract a part of the a 3 min read How to get input value search box and enter it in AngularJS component using Enter key ? In this article, we will see how to get an input value entered in the search box using Enter key in AngularJS. To implement a search component in AngularJS that calls the function whenever the user presses the enter key(keyCode = 13) and then does some relatable task from the user input. This can be 3 min read Angular PrimeNG Form Inputtext Outlined vs Filled Component Angular PrimeNG is an open-source framework with a rich set of native Angular UI components that are used for great styling and this framework is used to make responsive websites with very much ease. In this article, we will learn how to use the InputText  Outlined vs Filled Component in Angular Pri 3 min read How to use a Custom Service Inside a Filter in AngularJS ? AngularJS is a JavaScript-based framework. It can be used by adding it to an HTML page using a <script> tag. AngularJS helps in extending the HTML attributes with the help of directives and binding of data to the HTML with expressions. An Angular service is a broad category that consists of an 4 min read Angular PrimeNG Form Inputtext Styling Component Angular PrimeNG is a UI component catalog for angular applications. It consists of a wide range of UI components that help in making fast and scalable websites. In this article, we will see Angular PrimeNG Form Inputtext Styling Component. The Angular PrimeNG Form InputText Component renders a field 3 min read Angular PrimeNG Form InputMask Styling Component Angular PrimeNG is a collection of Angular UI components. It is an open-source library developed by PrimeTek. It has many ready-to-use components that make it one of the top choices of angular developers when it comes to choosing a UI library. In this article, we will see the Angular PrimeNG Form In 4 min read Like