angular2 how to use ng-template from a different file? When I place the ng-template within the same HTML where I use it works but when I move ng-template into a separate file th
If you are loading a separate file, you can define a Component in the separate file (instead of a ). And then inject the entire Component into the using the *ngComponentOutlet.
You can find the full sulotion with example here: https://stackoverflow.com/a/59180628/2658683