By
Предикаты для использования с функциями запросов DebugElement.
API
class By {
static all(): Predicate<DebugNode>;
static css(selector: string): Predicate<DebugElement>;
static directive(type: Type<any>): Predicate<DebugNode>;
}
css
Predicate<DebugElement>Соответствует элементам, выбранным с помощью указанного CSS-селектора.
@paramselector
string
@returns
Predicate<DebugElement>
Примечания по использованию
Пример
debugElement.query(By.css('[attribute]'));
Super-powered by Google ©2010–2025.
Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0.
https://angular.dev/api/platform-browser/By