Improve this Doc View Source $parseProvider
$parseProvider can be used for configuring the default behavior of the $parse service.
Methods
-
addLiteral(literalName, literalValue);
Configure $parse service to add literal values that will be present as literal at expressions.
Parameters
Param Type Details literalName stringToken for the literal value. The literal name value must be a valid literal name.
literalValue *Value for this literal. All literal values must be primitives or
undefined. -
setIdentifierFns([identifierStart], [identifierContinue]);
Allows defining the set of characters that are allowed in Angular expressions. The function
identifierStartwill get called to know if a given character is a valid character to be the first character for an identifier. The functionidentifierContinuewill get called to know if a given character is a valid character to be a follow-up identifier character. The functionsidentifierStartandidentifierContinuewill receive as arguments the single character to be identifier and the character code point. These arguments will bestringandnumeric. Keep in mind that thestringparameter can be two characters long depending on the character representation. It is expected for the function to returntrueorfalse, whether that character is allowed or not.Since this function will be called extensively, keep the implementation of these functions fast, as the performance of these functions have a direct impact on the expressions parsing speed.
Parameters
Param Type Details identifierStart (optional)function=The function that will decide whether the given character is a valid identifier start character.
identifierContinue (optional)function=The function that will decide whether the given character is a valid identifier continue character.
© 2010–2017 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://code.angularjs.org/1.5.11/docs/api/ng/provider/$parseProvider