I have different html files which should be triggered depending on a condition. However, I should be using just one typescript file for everything. Is this possible to do? Ideally, the value of templateUrl will be changed.
@Component({
selector: 'app-profile',
templateUrl: 'template1.component.html',
styleUrls: ['appprofile.component.css']
})
@Componentdecorator is executed before the component is instantiated, so if your plan is to change it based on your components properties, it's not possible.