Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { inject } from '@aurelia/kernel';
import { IRouter, lifecycleLogger, ReentryBehavior } from '@aurelia/router';
import { Profile as ProfileModel } from 'shared/models/profile';
import { ProfileService } from 'shared/services/profile-service';
import { SharedState } from 'shared/state/shared-state';
@inject(SharedState, ProfileService, IRouter)
// @lifecycleLogger('profile')
export class Profile {
public static parameters: string[] = ['name'];
public reentryBehavior: string = ReentryBehavior.refresh;
private username?: string;
private profile?: ProfileModel;
public constructor(
private readonly sharedState: SharedState,
private readonly profileService: ProfileService,
private readonly router: IRouter) {
}
public canEnter() { console.log(`profile canEnter`); return true; }
public created() { console.log(`profile created`); }
public binding() { console.log(`profile binding`); }
public bound() { console.log(`profile bound`); }
public attaching() { console.log(`profile attaching`); }
public attached() { console.log(`profile attached`); }