feat: add parameters as navigation
Now there is automatic navigation on the inserted url and on localStorage
This commit is contained in:
@ -61,8 +61,18 @@ export class TabsComponent implements AfterViewInit {
|
||||
let selected = TabStorageService.selected;
|
||||
|
||||
let index = 0;
|
||||
if (selected !== null)
|
||||
index = selected.type;
|
||||
|
||||
if (selected !== null) {
|
||||
if (selected.type === null) {
|
||||
if (this.groupTab.existParams(selected))
|
||||
index = 0;
|
||||
else if (this.professorTab.existParams(selected))
|
||||
index = 1;
|
||||
else if (this.lectureHallTab.existParams(selected))
|
||||
index = 2;
|
||||
} else
|
||||
index = selected.type;
|
||||
}
|
||||
|
||||
if (index === null || index === 0)
|
||||
this.chooseTabs(0).then();
|
||||
|
Reference in New Issue
Block a user