Skip to content

Instantly share code, notes, and snippets.


  • None
Block or report user

Report or block lstone

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
lstone /
Created Oct 6, 2015
ui.mask w/ custom placeholder options (focused vs unfocused field)
# @ngdoc directive
# @name ui.mask.directive:uiMask
# @restrict A
# @scope
# @description
# Attaches input mask onto input element. NOTE: This is a custom version the ui-mask plugin that addresses the issue of the placeholder attribute
# overwritten rather than being displayed until the user focuses into the input field. Credit goes to:
# @param {String} ui-mask - The keys in maskDefinitions represent the special tokens/characters used in your mask declaration to delimit acceptable ranges of inputs. For example, we use '9' here to accept any numeric values for a phone number: ui-mask="(999) 999-9999". The values associated with each token are regexen. Each regex defines the ranges of values that will be acceptable as inputs in the position of that token.
You can’t perform that action at this time.