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

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

Projects

None yet

2 participants

@martinstein

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.

@btford btford added a commit to btford/angular.js that referenced this issue Aug 8, 2012
@btford btford fix(ngPluralize): fixes ng-pluralize when using non-standard start/en…
…d symbols

Closes #1134
18affdf
@btford btford closed this in da64902 Aug 10, 2012
@IgorMinar IgorMinar added a commit to IgorMinar/angular.js that referenced this issue Aug 11, 2012
@btford @IgorMinar btford + IgorMinar fix(ngPluralize): fixes ng-pluralize when using non-standard start/en…
…d symbols

Closes #1134
f7f4026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment