Skip to content

Instantly share code, notes, and snippets.

Avatar

John McArthur BigBadJock

View GitHub Profile
View Surface-BoxStarter
choco install googlechrome
choco install 7zip.install
choco install virtualclonedrive --allow-empty-checksums
choco install filezilla --allow-empty-checksums
choco install dropbox --allow-empty-checksums
choco install windirstat --allow-empty-checksums
choco install greenshot --allow-empty-checksums
choco install foxitreader --allow-empty-checksums
choco install kindle --allow-empty-checksums
@BigBadJock
BigBadJock / auth.guard.spec.ts
Created Apr 13, 2019
Angular Authentication Guard Service Spec
View auth.guard.spec.ts
import { HttpClientModule } from '@angular/common/http';
import { fakeAsync, TestBed } from '@angular/core/testing';
import { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
import { AuthGuard } from './auth.guard';
class MockActivatedRouteSnapshot {
private _data: any;
get data(){
return this._data;
}
@BigBadJock
BigBadJock / auth.guard.ts
Created Apr 13, 2019
Angular 7 Authentication Guard Service
View auth.guard.ts
import { Injectable } from '@angular/core';
import { ActivatedRouteSnapshot, CanActivate, CanLoad, Route, Router, RouterStateSnapshot } from '@angular/router';
import { Observable } from 'rxjs';
import { AuthenticationService } from 'src/app/Services/Authentication/authentication.service';
@Injectable({
providedIn: 'root'
})
export class AuthGuard implements CanActivate, CanLoad {
View BoxStarter-FullBoxInstall
choco install googlechrome
choco install 7zip.install
choco install vlc
choco install virtualclonedrive --allow-empty-checksums
choco install speccy
choco install sysinternals
choco install filezilla --allow-empty-checksums
choco install dropbox --allow-empty-checksums
choco install windirstat --allow-empty-checksums
You can’t perform that action at this time.