Answer the question
In order to leave comments, you need to log in
How to implement different templates in Angular builds?
Good afternoon) I have a regular web version in the project and I want to make a mobile phone in the same project, through ionic everything is fine and everything is fine, please tell me how best to implement a different representation of templates.
Let's say I have a header.component.html, and when building for a mobile phone, I took header-mobile.component.html instead
Answer the question
In order to leave comments, you need to log in
pass the environment variable through process.env to the code, and in the @Component() decorator, in the temaplteUrl field, substitute the desired path depending on the value of the environment variable
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question