Could anyone offer some assistance with this task I have at hand:
Let's imagine we have a global constant 'env' that I need to use to replace template URLs in components during build time. Each component has a default template URL, but for each different 'env' constant, we need to use a different template URL. We can define a custom template URL for each component based on the 'env' constant, and if one is not defined, then the default template should be used.
For instance:
The following components use default template URLs:
AppComponent1 -> 'defaultTemplate1'
AppComponent2 -> 'defaultTemplate2'
AppComponent3 -> 'defaultTemplate3'
When the 'env' constant is set as 'env_1', I want to use the following templates:
AppComponent1 -> 'env_1Template1'
AppComponent2 -> 'env_1Template2'
AppComponent3 -> 'defaultTemplate3'
For 'env' as 'env_2', the templates needed are:
AppComponent1 -> 'env_2Template1'
AppComponent2 -> 'defaultTemplate2'
AppComponent3 -> 'env_2Template3'