diff --git a/src/app/app.component.html b/src/app/app.component.html
index 92854828..f736e212 100644
--- a/src/app/app.component.html
+++ b/src/app/app.component.html
@@ -4,9 +4,15 @@
-
+
-
+
{{menu.title}}
diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index 42f17e39..c25ca087 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -7,6 +7,7 @@ import {
} from '@angular/router';
import { filter, map, mergeMap } from 'rxjs/operators';
import { SeoService, SeoData } from './core/services/seo.service';
+import { OperatorMenuService } from './core/services/operator-menu.service';
interface Menu {
title: string;
@@ -46,7 +47,8 @@ export class AppComponent implements OnInit {
constructor(
private _router: Router,
private _activatedRoute: ActivatedRoute,
- private _seo: SeoService
+ private _seo: SeoService,
+ private _operatorMenuService: OperatorMenuService
) {}
ngOnInit() {
@@ -66,4 +68,11 @@ export class AppComponent implements OnInit {
)
.subscribe((data: SeoData) => this._seo.setHeaders(data));
}
+
+ shouldOpenChildMenu(title: string) {
+ // for accessibility we need to ensure child menu is open when clicked
+ if (title === 'Operators') {
+ this._operatorMenuService.openOperatorMenu();
+ }
+ }
}
diff --git a/src/app/core/core.module.ts b/src/app/core/core.module.ts
index 5b4767f3..aed5392f 100644
--- a/src/app/core/core.module.ts
+++ b/src/app/core/core.module.ts
@@ -5,6 +5,7 @@ import { FlexLayoutModule } from '@angular/flex-layout';
import { CopierService } from './services/copier.service';
import { SeoService } from './services/seo.service';
+import { OperatorMenuService } from './services/operator-menu.service';
import { ToolbarComponent } from './components/toolbar/toolbar.component';
import { MaterialModule } from '../material/material.module';
@@ -17,7 +18,7 @@ export class CoreModule {
static forRoot() {
return {
ngModule: CoreModule,
- providers: [CopierService, SeoService]
+ providers: [CopierService, SeoService, OperatorMenuService]
};
}
}
diff --git a/src/app/core/services/operator-menu.service.ts b/src/app/core/services/operator-menu.service.ts
new file mode 100644
index 00000000..74c8399d
--- /dev/null
+++ b/src/app/core/services/operator-menu.service.ts
@@ -0,0 +1,19 @@
+import { Injectable } from '@angular/core';
+import { Subject } from 'rxjs/Subject';
+
+@Injectable()
+export class OperatorMenuService {
+ private _operatorMenuStatus = new Subject();
+
+ openOperatorMenu() {
+ this._operatorMenuStatus.next(true);
+ }
+
+ closeOperatorMenu() {
+ this._operatorMenuStatus.next(false);
+ }
+
+ menuStatus() {
+ return this._operatorMenuStatus.asObservable();
+ }
+}
diff --git a/src/app/operators/operators.component.html b/src/app/operators/operators.component.html
index 91046a0e..98470d77 100644
--- a/src/app/operators/operators.component.html
+++ b/src/app/operators/operators.component.html
@@ -1,31 +1,29 @@
-
-
-
-
+
+
+
+
+ *ngFor="let operator of groupedOperators[category]"
+ [routerLink]="['/operators', operator.name]"
+ routerLinkActive="active">
{{ operator.name }}
-