Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

451 B
Raw Blame
import { BehaviorSubject } from 'rxjs';
import { filter, take } from 'rxjs/operators';
import { Injectable } from '@angular/core';

@Injectable({ providedIn: 'root' })
export class MainMenuNavigationService {
  public navigationEvents$ = new BehaviorSubject<string>('');

  public onActivate(...names:string[]) {
    return this
      .navigationEvents$
      .pipe(
        filter((evt) => names.indexOf(evt) !== -1),
        take(1),
      );
  }
}