Dart Documentationangular.mockProbe

Probe class

@NgDirective(selector: '[probe]')
class Probe implements NgDetachAware {
 final Scope scope;
 final Injector injector;
 final Element element;
 final NodeAttrs _attrs;

 Probe(Scope this.scope, Injector this.injector, Element this.element, NodeAttrs this._attrs) {
   scope.$root[_attrs['probe']] = this;
 }

 detach() => scope.$root[_attrs['probe']] = null;

 /**
  * Retrieve a Directive at the current element.
  */
 directive(Type type) => injector.get(type);
}

Implements

NgDetachAware

Constructors

new Probe(Scope scope, Injector injector, Element element, NodeAttrs _attrs) #

Creates a new Object instance.

Object instances have no meaningful state, and are only useful through their identity. An Object instance is equal to itself only.

docs inherited from Object
Probe(Scope this.scope, Injector this.injector, Element this.element, NodeAttrs this._attrs) {
 scope.$root[_attrs['probe']] = this;
}

Properties

final Element element #

final Element element

final Injector injector #

final Injector injector

final Scope scope #

final Scope scope

Methods

dynamic detach() #

detach() => scope.$root[_attrs['probe']] = null;

dynamic directive(Type type) #

Retrieve a Directive at the current element.

directive(Type type) => injector.get(type);