Answers for "first letter capital using pipe in angular"

5

angular pipe first letter uppercase

{{ value_expression | titlecase }}
Posted by: Guest on June-25-2020
0

angular capitalize first letter

content_copy
@Component({
  selector: 'titlecase-pipe',
  template: `<div>
    <p>{{'some string' | titlecase}}</p> <!-- output is expected to be "Some String" -->
    <p>{{'tHIs is mIXeD CaSe' | titlecase}}</p> <!-- output is expected to be "This Is Mixed Case" -->
    <p>{{'it\\'s non-trivial question' | titlecase}}</p> <!-- output is expected to be "It's Non-trivial Question" -->
    <p>{{'one,two,three' | titlecase}}</p> <!-- output is expected to be "One,two,three" -->
    <p>{{'true|false' | titlecase}}</p> <!-- output is expected to be "True|false" -->
    <p>{{'foo-vs-bar' | titlecase}}</p> <!-- output is expected to be "Foo-vs-bar" -->
  </div>`
})
export class TitleCasePipeComponent {
}
Posted by: Guest on March-24-2022

Code answers related to "first letter capital using pipe in angular"

Code answers related to "Javascript"

Browse Popular Code Answers by Language