By
class
Predicates for use with DebugElement's query functions.
class By {
static all(): Predicate<DebugNode>
static css(selector: string): Predicate<DebugElement>
static directive(type: Type<any>): Predicate<DebugNode>
}
Static methods
all() |
---|
Match all nodes. |
static all(): Predicate<DebugNode>ParametersThere are no parameters. Returns
|
Usage NotesExample
|
css() | |||
---|---|---|---|
Match elements by the given CSS selector. | |||
static css(selector: string): Predicate<DebugElement>Parameters
Returns
| |||
Usage NotesExample
|
directive() | |||
---|---|---|---|
Match nodes that have the given directive present. | |||
static directive(type: Type<any>): Predicate<DebugNode>Parameters
Returns
| |||
Usage NotesExample
|
© 2010–2020 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v8.angular.io/api/platform-browser/By