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

Commit d3fb8dd

Browse files
docs($filter): clarify what is a valid filter name
Also updates the CHANGELOG to add info about this breaking some previous invalid uses of $filter Closes #10054 Closes #10131
1 parent 95e03bc commit d3fb8dd

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,12 @@
9494
([8eabc546](https://github.com/angular/angular.js/commit/8eabc5463c795d87f37e5a9eacbbb14435024061),
9595
[#9942](https://github.com/angular/angular.js/issues/9942))
9696

97+
## Breaking Changes
9798

99+
- **$parse:** due to [fbad2805](https://github.com/angular/angular.js/commit/fbad2805703569058a4a860747b0e2d8aee36bdf),
100+
you can't use characters that have special meaning in AngularJS expressions (ex.: `.` or `-`)
101+
as part of filter's name. Before this commit custom filters could contain special characters
102+
(like a dot) in their name but this wasn't intentional.
98103

99104
<a name="1.3.2"></a>
100105
# 1.3.2 cardiovasculatory-magnification (2014-11-07)

docs/content/guide/filter.ngdoc

+5
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ The filter function should be a [pure function](http://en.wikipedia.org/wiki/Pur
9191
means that it should be stateless and idempotent. Angular relies on these properties and executes
9292
the filter only when the inputs to the function change.
9393

94+
<div class="alert alert-warning">
95+
**Note:** filter names must be valid angular expression identifiers, such as `uppercase` or `orderBy`.
96+
Names with special characters, such as hyphens and dots, are not allowed.
97+
</div>
98+
9499
The following sample filter reverses a text string. In addition, it conditionally makes the
95100
text upper-case.
96101

0 commit comments

Comments
 (0)