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

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

Closed
@martinstein

Description

@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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions