2016-06-23 12:47:54 -04:00
|
|
|
/**
|
|
|
|
* @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
|
|
|
|
*/
|
|
|
|
|
2016-09-27 20:12:25 -04:00
|
|
|
import {Component} from '@angular/core';
|
2015-11-02 18:46:59 -05:00
|
|
|
|
|
|
|
// #docregion LowerUpperPipe
|
|
|
|
@Component({
|
2016-09-09 00:41:09 -04:00
|
|
|
selector: 'lowerupper-pipe',
|
2015-11-02 18:46:59 -05:00
|
|
|
template: `<div>
|
2015-12-15 03:45:31 -05:00
|
|
|
<label>Name: </label><input #name (keyup)="change(name.value)" type="text">
|
2016-09-09 00:41:09 -04:00
|
|
|
<p>In lowercase: <pre>'{{value | lowercase}}'</pre>
|
|
|
|
<p>In uppercase: <pre>'{{value | uppercase}}'</pre>
|
2015-11-02 18:46:59 -05:00
|
|
|
</div>`
|
|
|
|
})
|
2016-09-09 00:41:09 -04:00
|
|
|
export class LowerUpperPipeComponent {
|
2018-06-18 19:38:33 -04:00
|
|
|
// TODO(issue/24571): remove '!'.
|
|
|
|
value !: string;
|
2016-02-11 20:01:17 -05:00
|
|
|
change(value: string) { this.value = value; }
|
2015-11-02 18:46:59 -05:00
|
|
|
}
|
|
|
|
// #enddocregion
|