It is my app.component.ts:
import { Component } from \'@angular/core\';
@Component({
templateUrl: \'app/app.component.html\',
selector: \'my-app\'
}
I've tried lazy attribute which doesn't work. Using router and ModuleLoader are great but a bit complex. If you want to keep your application not too much complex, the easiest solution is to use NgIf for rendering tabs.
And define a flag to render the selected tab.
handleChange(e) {
this.activeTab = e.index;
}