Bug #243 Creacion del filtro dash-if-empty para ticket Index
This commit is contained in:
parent
155e5a4d4f
commit
c651428063
|
@ -0,0 +1,15 @@
|
|||
import ngModule from '../module';
|
||||
|
||||
/**
|
||||
* Returns dash when value is empty, otherwise returns the same string.
|
||||
*
|
||||
* @return {String} The string result
|
||||
*/
|
||||
export default function dashIfEmpty() {
|
||||
return function(input) {
|
||||
if (input == null || input == '')
|
||||
return '-';
|
||||
return input;
|
||||
};
|
||||
}
|
||||
ngModule.filter('dashIfEmpty', dashIfEmpty);
|
|
@ -1,2 +1,3 @@
|
|||
import './phone';
|
||||
import './ucwords';
|
||||
import './dash-if-empty';
|
||||
|
|
Loading…
Reference in New Issue