Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

ng-pluralize breaks when startSymbol/endSymbol are overridden #1134

Closed
martinstein opened this issue Jul 10, 2012 · 0 comments
Closed

ng-pluralize breaks when startSymbol/endSymbol are overridden #1134

martinstein opened this issue Jul 10, 2012 · 0 comments

Comments

@martinstein
Copy link

jsFiddle demonstration: http://jsfiddle.net/awmBZ/1/

When you configure angular with different start- and end-symbols like this:

app.config(function($interpolateProvider) {
  $interpolateProvider.startSymbol('${');
  $interpolateProvider.endSymbol('}');
});

then the interpolation of values into the pluralize-string breaks. The line that causes the problems is in ngPluralizeDirective:

$interpolate(expression.replace(BRACE, '{{' + numberExp + '-' + offset + '}}'));

, since it simply assumes that {{ is the startSymbol and }} is the endsymbol.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants