• 개요
@angular/platform-browser

By

클래스
안정화

Predicates for use with DebugElement's query functions.

API

    
      class By {}
    
    

all

Predicate<DebugNode>

Match all nodes.

사용 시 참고사항

Example

debugElement.query(By.all());

css

Predicate<DebugElement>

Match elements by the given CSS selector.

@paramselectorstring
사용 시 참고사항

Example

debugElement.query(By.css('[attribute]'));

directive

Predicate<DebugNode>

Match nodes that have the given directive present.

@paramtypeType<any>
사용 시 참고사항

Example

debugElement.query(By.directive(MyDirective));
상세 내용으로 이동