This repository has been archived by the owner on Jan 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(service): fix interpolation issue with non-string as input
Since AngularJS 1.5, the input values (i.e. of a filter) will used 'as is' which means numbers (as translation ids) will not be transformed to strings anymore. This generates unexpected errors. Because this fix, the result is that explicit typed number values will be return (transformed as a string). ``` // before and < AJS 1.5 $filter('translate)(0) === 0 // after and < AJS 1.5 $filter('translate)(0) === '0' // before and AJS 1.5+ $filter('translate)(0) exception // after and AJS 1.5+ $filter('translate)(0) === '0' ``` Fixes #1511
- Loading branch information
Showing
2 changed files
with
76 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters