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-08-16 14:15:01 -04:00
|
|
|
import {Component, NgModule} from '@angular/core';
|
|
|
|
import {BrowserModule} from '@angular/platform-browser';
|
|
|
|
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic';
|
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 {
|
2015-11-02 18:46:59 -05:00
|
|
|
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
|