0
0
llucycodes42
This code imports the Injectable class from the Angular core library and also brings in the Route and CanLoad services. The NameGuard class implements the CanLoad interface, which means that it can check to see if a route can be loaded before trying to do anything else. In this case, the canLoad() method returns true, so the route will be loaded.
Library: angular
Shortcut: a_guard_can_load
import { Injectable } from '@angular/core';
import { CanLoad, Route } from '@angular/router';
@Injectable({providedIn: 'root'})
export class NameGuard implements CanLoad {
constructor() { }
canLoad(route: Route) {
return true;
}
}