New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

Comments

Projects
None yet
2 participants
@martinstein

martinstein commented Jul 10, 2012

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 join this conversation on GitHub. Already have an account? Sign in to comment