import { Injectable } from '@angular/core' ; import { Resolve , ActivatedRouteSnapshot } from '@angular/router' ; import { AccountService } from "../../services/account.service" ; @ Injectable ( ) export class HomeResolve implements Resolve < any > { constructor ( private accountService ) { } resolve ( route ) { return this . accountService . getNotifications ( ) ; } }