Java, .NET, PHP, PYTHON, ANGULAR, .NET, ML, Data Scince, Testing, CI Tutorials in Easy Languages.

"Best Software Training, Internship, Project Development center of Indore India, Helpline 780506-3968"

Pipe in Angular JS:-

It is used to change the properties of ViewData under the Html file, It is also called Filter in Angular JS application,it was renamed as a PIPE angular Framework.


It will be declared under HTML file with angular view attribute or String Interpolation

{{'ram'|uppercase}}


Here are some built-in pipes available with angular −
  • Lowercasepipe
  • Uppercasepipe
  • Datepipe
  • Currencypipe
  • Jsonpipe
  • Percentpipe
  • Decimalpipe
  • Slicepipe

 ......................................................................................................................................................

 Code of TS FIle:-

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

@Component({
  selector: 'app-templatedemo',
  templateUrl: './templatedemo.component.html',
  styleUrls: ['./templatedemo.component.css']
})
export class TemplatedemoComponent implements OnInit {
  a
  todaydate = new Date();
  constructor() {
    }

  ngOnInit() {
  }

}

Code of HTML File:-

<span appChangeText>{{'Welcome in Angular JS'|uppercase}}</span>
 <b>{{6589.23 | currency:"USD":true}}</b>
      // Boolean true is used to get the sign of the currency.
      <h1>Date pipe</h1>
      <b>{{todaydate | date:'d/M/y'}}</b>
      <br/>
     
      <b>{{todaydate | date:'longTime'}}</b>
      <h1>Decimal Pipe</h1>
      <b>{{ 454.78787814 | number: '3.1-6' }}</b>


   

Post a Comment

If you have any doubt in programming or join online classes then you can contact us by comment .

Previous Post Next Post