title: Auth Guard is applied on Lazy Loaded Modules in angular2 but still it is Redirecting Despite of Rejection canLoad Is Not Working
body: <p>Assuming Return false will be returned on authentication either on http call but for now i am returning false from CanLoadChildren() Method Inorder to test canLoad But despite of calling canLoad and returning false canLoad still loads Module and redirect to that module.can any one help ? Thanks</p>
  
  <p><strong>AuthService</strong> </p>
  
  <pre><code>import {
      Injectable
  } from '@angular/core';
  
  @Injectable()
  export class AuthService {
  
      constructor() {}
  
      public CanLoadChildren(): boolean {
  
          return false;
      }
  
  }
  </code></pre>
  
  <p><strong>Auth Guard File</strong></p>
  
  <pre><code>import {
      AuthService
  } from './auth.service';
  
  import {
      Injectable
  } from '@angular/core';
  
  import {
      CanActivate,
      CanLoad,
      Route,
      ActivatedRouteSnapshot,
      RouterStateSnapshot,
      Router
  } from '@angular/router';
  
  
  @Injectable()
  export class CanActivateViaAuthGuardService implements CanActivate, CanLoad {
  
      constructor(private _authService: AuthService, private router: Router) {}
  
      canLoad(route: Route): boolean {
  
          console.log("Can Load Childrens Called");
          console.log(route);
          this.router.navigate(['/Domains']);
          return this._authService.CanLoadChildren();
      }
  }
  </code></pre>
  
  <p><strong>app.router.ts</strong></p>
  
  <pre><code>export const APPROUTES: Routes = [
  
      {
          path: 'User',
  
          canLoad: [CanActivateViaAuthGuardService],
  
          loadChildren: 'app/LazyAdminConsoleModule'
      }
  
  ]
  </code></pre>