ApplicationRef class

A reference to an Angular application running on a page.

For more about Angular applications, see the documentation for bootstrap.


hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


bootstrap<T>(ComponentFactory<T> componentFactory) ComponentRef<T>
Bootstrap a new component at the root level of the application. [...]
dispose() → void
Dispose of this application and all of its components.
handleUncaughtException(Object error, [StackTrace trace, String reason]) → void
Forwards an error and trace to the user's error handler. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
registerChangeDetector(ChangeDetectorRef detector) → void
Registers a change detector with this host for automatic detection.
registerDisposeListener(void listener()) → void
Register a listener to be called when the application is disposed.
reportViewException(View view, Object error, [StackTrace trace]) → void
Disables the view as an error, and forwards to reportException.
@noInline, inherited
run<R>(FutureOr<R> callback()) FutureOr<R>
Runs the given callback in the zone and returns the result of that call. [...]
runInZone<R>(R callback()) → R
Executes the callback function within the current NgZone. [...]
tick() → void
Runs a change detection pass on all registered root components. [...]
toString() String
A string representation of this object. [...]
unregisterChangeDetector(ChangeDetectorRef detector) → void
Removes a change detector from this host (no longer checked).


operator ==(Object other) bool
The equality operator. [...]