Search
 
SCRIPT & CODE EXAMPLE
 

TYPESCRIPT

how to capitalize the first word of a sentence in ionic

<ion-content>
  <ion-title>Text Area Test</ion-title>
  <ion-item>
    <ion-textarea [(ngModel)]="someAutoFormattedInput" (ionChange)="onAutoFormatChanged()"></ion-textarea>
  </ion-item>
</ion-content>
Comment

how to capitalize the first word of a sentence in ionic

import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-textarea-test',
  templateUrl: './textarea-test.page.html',
  styleUrls: ['./textarea-test.page.scss'],
})
export class TextareaTestPage implements OnInit {

  someAutoFormattedInput: string;

  constructor() { }

  ngOnInit() {
  }

  onAutoFormatChanged() {
    this.someAutoFormattedInput = this.setFirstLetterToUppercase(this.someAutoFormattedInput);
  }

  private setFirstLetterToUppercase(string:string):string {
    // https://dzone.com/articles/how-to-capitalize-the-first-letter-of-a-string-in
    return string.charAt(0).toUpperCase() + string.slice(1);
  }

}
Comment

PREVIOUS NEXT
Code Example
Typescript :: call appply bind 
Typescript :: typescript declare array of maps 
Typescript :: how to get date from Sun Dec 10 1995 00:00:00 GMT+0530 (India Standard Time) 
Typescript :: vscode pass argument to registerCommand 
Typescript :: ht office 
Typescript :: sum of bits calculator 
Typescript :: mac book join raspberry pi webserver 
Typescript :: return from r in restaurants orderby r.Name select r c# 
Typescript :: render html contents from url in asp.net razor 
Typescript :: minikube arguments --cpus 
Typescript :: wrapper tsx 
Typescript :: type for object props 
Typescript :: ic markets minimum deposit 
Typescript :: how to convert js to ts 
Typescript :: first k digits of n*n 
Typescript :: react static typescript properties 
Typescript :: powershell check if the sql server ports are dynamic 
Typescript :: typescript object annotation 
Typescript :: apply limit to fetch number of documents firebase firestore 
Typescript :: como agregarle un rango a mat-datapicker 
Typescript :: which of the foolowing ia an element of pallette that holds multiple elements of nspecific purpose 
Typescript :: typescript hello world 
Typescript :: ionic google map 
Typescript :: democrats are pussies 
Cpp :: fast i/o c++ 
Cpp :: c++ vector decimal to binary 
Cpp :: vector with pinter cout c++ 
Cpp :: c++ usleep() 
Cpp :: hello world in cpp 
Cpp :: eosio parse string 
ADD CONTENT
Topic
Content
Source link
Name
9+1 =