По
Experimental Class
Обзор класса
class By {
static all() : Predicate<DebugElement>
static css(selector: string) : Predicate<DebugElement>
static directive(type: Type<any>) : Predicate<DebugElement>
}
Описание класса
Предикаты для использования с функциями запроса DebugElement.
Статические члены
all() : Predicate<DebugElement>
Совпадение всех элементов.
debugElement.query(By.all());
css(selector: string) : Predicate<DebugElement>
Совпадение элементов по заданному CSS-селектору.
debugElement.query(By.css('[attribute]'));
directive(type: Type<any>) : Predicate<DebugElement>
Совпадение элементов, у которых присутствует заданное директива.
debugElement.query(By.directive(MyDirective));
экспортировано из @angular/platform-browser/index, определено в @angular/platform-browser/src/dom/debug/by.ts
© 2010–2017 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v2.angular.io/docs/ts/latest/api/platform-browser/index/By-class.html