Gets the value at path from environment or the path if value is undefined.
This pipe uses EnvironmentQuery.get(Path,GetOptions?) to get the value synchronously and render it in the template. If the value doesn't exist or throws an error, the path will be rendered as a string.
Gets the value at path as Observable from environment or the path as Observable if value is undefined.
This pipe uses EnvironmentQuery.get$(Path,GetOptionsReactive?) to get the value asynchronously and render it in the template. If the value doesn't exist the path will be rendered as a string.
Angular Environment Pipes
To use these pipes it is not necessary to inject the
EnvironmentQuery
service into the component. They use their own injector to get the properties.Use cases
Below are examples of the expected behavior and some implementation examples.
Table of Contents
environmentValue
Gets the value at path from environment or the path if value is undefined.
This pipe uses
EnvironmentQuery.get(Path,GetOptions?)
to get the value synchronously and render it in the template. If the value doesn't exist or throws an error, the path will be rendered as a string.environmentValue$
Gets the value at path as Observable from environment or the path as Observable if value is undefined.
This pipe uses
EnvironmentQuery.get$(Path,GetOptionsReactive?)
to get the value asynchronously and render it in the template. If the value doesn't exist the path will be rendered as a string.