Skip to content

Instantly share code, notes, and snippets.

@lgrayland
Last active November 26, 2015 16:54
Show Gist options
  • Save lgrayland/3c2f596b33a05214c826 to your computer and use it in GitHub Desktop.
Save lgrayland/3c2f596b33a05214c826 to your computer and use it in GitHub Desktop.
Filter to create place holder text when fiend is null of undefined
.filter('placeholdEmpty', function($timeout) {
var incre = 0
$timeout(function(){
incre = 0;
}, 5000);
return function (input) {
if (!(input == undefined || input == null)) {
return input;
} else {
incre += 1;
return 'new property ' + incre;
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment