I am new to angular 2, I have a component named Register, in this 1 component I have 5 HTML pages where one click of 1st register page I will go to the 2nd register page and on click of 2nd register page I will go to the 3rd register page. How can I make 5 HTML pages in 1 component I means is there a way to achieve multiple templates per component? How to do routing? The main intent is to have separate HTML & SCSS files and routing logic.
As of now I am rendering pages using ngIf which has made my page very lengthy. Is there a way around to achieve this?
<!--View 1-->
<div class="open-card-BG" *ngIf="registerView=='regView1'">
Register Page 1
</div>
<!--View 2-->
<div class="open-card-BG" *ngIf="registrationView=='regView2'">
Register Page 2
</div>
@Component({
selector: 'register-page',
templateUrl: './register-page.component.html',
styleUrls: ['./register-page.component.scss'],
providers : [RegisterService,Configuration,LocalStorageService]
})
ngOnInit() {
this.registerView= "regView1";
}
changeView(view) {
this.registerView= view;
}
previousView(view) {
this.registerView= view;
}