How to use the @aurelia/router.lifecycleLogger function in @aurelia/router

To help you get started, we’ve selected a few @aurelia/router examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aurelia / aurelia / test / realworld / src / components / settings / settings.ts View on Github external
import { inject } from '@aurelia/kernel';
import { IRouter, lifecycleLogger } from '@aurelia/router';

import { UserService } from 'shared/services/user-service';
import { SharedState } from 'shared/state/shared-state';

@lifecycleLogger('settings')
@inject(UserService, SharedState, IRouter)
export class Settings {
  public constructor(
    private readonly userService: UserService,
    private readonly sharedState: SharedState,
    private readonly router: IRouter,
  ) {}

  public created() { return; }
  public binding() { return; }
  public bound() { return; }
  public attaching() { return; }
  public attached() { return; }
  public detaching() { return; }
  public detached() { return; }
  public unbinding() { return; }
github aurelia / aurelia / test / realworld / src / components / editor / editor.ts View on Github external
import { inject } from '@aurelia/kernel';
import { IRouter, lifecycleLogger } from '@aurelia/router';
import { bindable, BindingMode } from '@aurelia/runtime';

import { Article } from 'shared/models/article';
import { ArticleService } from 'shared/services/article-service';

@lifecycleLogger('editor')
@inject(ArticleService, IRouter)
export class Editor {
  @bindable({ mode: BindingMode.twoWay }) public tag?: string;
  private article?: Article;
  private slug?: string;

  public constructor(
    private readonly articleService: ArticleService,
    private readonly router: IRouter,
  ) {}

  public created() { return; }
  public binding() { return; }
  public bound() { return; }
  public attaching() { return; }
  public attached() { return; }