src/app/shared/pipes/first-upper.pipe.ts
This pipe is deprecated
Uppercase the first letter of the string
Usage : value | firstUpper
{{ car | firstUpper}} formats to: Car
| Name | firstUpper |
| Pure | true |
| emptyMethod | ||||||||
emptyMethod(emptyParam: string)
|
||||||||
|
Defined in src/app/shared/pipes/first-upper.pipe.ts:61
|
||||||||
|
Parameters :
Returns :
string
pipe method return |
| transform | ||||||||
| the transform function is deprecated | ||||||||
transform(value: string)
|
||||||||
|
Defined in src/app/shared/pipes/first-upper.pipe.ts:70
|
||||||||
|
the transform function
Parameters :
Returns :
string
|
| Private _emptyAccessor |
Type : string
|
Default value : ''
|
|
Defined in src/app/shared/pipes/first-upper.pipe.ts:55
|
| Private cachedUrl |
Type : string
|
Default value : ''
|
|
Defined in src/app/shared/pipes/first-upper.pipe.ts:25
|
|
Example property |
| emptyProperty |
Type : string
|
Default value : ''
|
|
Defined in src/app/shared/pipes/first-upper.pipe.ts:31
|
|
pipe property |
import { Input, Output, PipeTransform, Pipe } from '@angular/core';
const name = 'firstUpper';
const pure = true;
/**
* Uppercase the first letter of the string
*
* __Usage :__
* value | firstUpper
*
* @example
* {{ car | firstUpper}}
* formats to: Car
* @deprecated This pipe is deprecated
*/
@Pipe({
name,
pure
})
export class FirstUpperPipe implements PipeTransform {
/**
* Example property
*/
private cachedUrl: string = '';
/**
* @example
* pipe property
*/
emptyProperty = '';
/**
* @example
* pipe input
*/
@Input() public emptyInput: string;
/**
* @example
* pipe output
*/
@Output() public emptyOutput: string;
/**
* @example
* pipe accessor
*/
get emptyAccessor() {
return this._emptyAccessor;
}
set emptyAccessor(val) {
this._emptyAccessor = val;
}
private _emptyAccessor = '';
/**
* @param emptyParam pipe method param
* @returns pipe method return
*/
emptyMethod(emptyParam: string) {
return emptyParam;
}
/**
* the transform function
* @deprecated the transform function is deprecated
* @param {string} value the value of the pipe
*/
transform(value: string): string {
return value.charAt(0).toUpperCase() + value.slice(1);
}
}