/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import {registerLocaleData} from '@angular/common'; import {Component} from '@angular/core'; // we need to import data for the french locale import localeFr from './locale-fr'; // registering french data registerLocaleData(localeFr); // #docregion PercentPipe @Component({ selector: 'percent-pipe', template: `
A: {{a | percent}}
B: {{b | percent:'4.3-5'}}
B: {{b | percent:'4.3-5':'fr'}}
A: {{a | percent}}
B: {{b | percent:'4.3-5'}}