Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Commit fd7ad68

Browse files
vicbmhevery
authored andcommitted
doc(selector): add the ":contains()" pseudo-selector
see dartbug.com/16422 Closes #639
1 parent 4dfa267 commit fd7ad68

File tree

3 files changed

+19
-17
lines changed

3 files changed

+19
-17
lines changed

lib/core/directive.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ abstract class NgAnnotation {
99
* * `.class` limit to an element with a given class.
1010
* * `[attribute]` limit to an element with a given attribute name.
1111
* * `[attribute=value]` limit to an element with a given attribute and value.
12+
* * `:contains(/abc/)` limit to an element which contains the given text.
1213
*
1314
*
1415
* Example: `input[type=checkbox][ng-model]`

lib/core_dom/selector.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ part of angular.core.dom;
2222
* [attribute]
2323
* [attribute=value]
2424
* element[attribute1][attribute2=value]
25+
* :contains(/abc/)
2526
* </pre>
2627
*
2728
*

test/core_dom/selector_spec.dart

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -44,23 +44,23 @@ main() {
4444
beforeEach(() => log = []);
4545
beforeEach(module((Module module) {
4646
module
47-
..type(_BElement)
48-
..type(_BClass)
49-
..type(_DirectiveAttr)
50-
..type(_WildcardDirectiveAttr)
51-
..type(_DirectiveFooAttr)
52-
..type(_BElementDirectiveAttr)
53-
..type(_DirectiveValueAttr)
54-
..type(_BElementDirectiveValue)
55-
..type(_ContainsAbc)
56-
..type(_AttributeContainsXyz)
57-
..type(_Component)
58-
..type(_Attribute)
59-
..type(_Structural)
60-
..type(_IgnoreChildren)
61-
..type(_TwoDirectives)
62-
..type(_OneOfTwoDirectives)
63-
..type(_TwoOfTwoDirectives);
47+
..type(_BElement)
48+
..type(_BClass)
49+
..type(_DirectiveAttr)
50+
..type(_WildcardDirectiveAttr)
51+
..type(_DirectiveFooAttr)
52+
..type(_BElementDirectiveAttr)
53+
..type(_DirectiveValueAttr)
54+
..type(_BElementDirectiveValue)
55+
..type(_ContainsAbc)
56+
..type(_AttributeContainsXyz)
57+
..type(_Component)
58+
..type(_Attribute)
59+
..type(_Structural)
60+
..type(_IgnoreChildren)
61+
..type(_TwoDirectives)
62+
..type(_OneOfTwoDirectives)
63+
..type(_TwoOfTwoDirectives);
6464
}));
6565
beforeEach(inject((DirectiveMap directives) {
6666
selector = directives.selector;

0 commit comments

Comments
 (0)