diff --git a/src/app/Directives/authcheck.directive.spec.ts b/src/app/Directives/authcheck.directive.spec.ts new file mode 100644 index 000000000..afbb7d034 --- /dev/null +++ b/src/app/Directives/authcheck.directive.spec.ts @@ -0,0 +1,52 @@ +import { TemplateRef, ViewContainerRef, Component, ViewChild } from '@angular/core'; +import { RouterTestingModule } from '@angular/router/testing'; +import { async, TestBed, ComponentFixture } from '@angular/core/testing'; +import { HttpClientModule } from '@angular/common/http'; + +// import Directive +import { AuthcheckDirective } from './authcheck.directive'; + +// import services +import { AuthService } from '../services/auth.service'; +import { GlobalService } from '../services/global.service'; +import { ApiService } from '../services/api.service'; +import { EndpointsService } from '../services/endpoints.service'; + +@Component({ + selector: 'app-authcheck', + template: `

AuthChecking Directive

`, +}) +class TestAuthDirectiveComponent { + @ViewChild(AuthcheckDirective) authchcekDirective: AuthcheckDirective; +} +describe('AuthcheckDirective', () => { + let component: TestAuthDirectiveComponent; + let fixture: ComponentFixture; + let authServive: AuthService; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ + AuthcheckDirective, + TestAuthDirectiveComponent + ], + imports: [ + RouterTestingModule, + HttpClientModule + ], + providers: [ + AuthService, + GlobalService, + ApiService, + EndpointsService + ] + }).compileComponents(); + fixture = TestBed.createComponent(TestAuthDirectiveComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + authServive = TestBed.get(AuthService); + })); + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/Directives/authcheck.directive.ts b/src/app/Directives/authcheck.directive.ts new file mode 100644 index 000000000..cb866e69c --- /dev/null +++ b/src/app/Directives/authcheck.directive.ts @@ -0,0 +1,29 @@ +import { Directive, OnInit, Input, ViewContainerRef, TemplateRef } from '@angular/core'; +import { AuthService } from '../services/auth.service'; + +@Directive({ + selector: '[appAuthcheck]' +}) +export class AuthcheckDirective implements OnInit { + + constructor( + private authService: AuthService, + private templateRef: TemplateRef, + private viewContainer: ViewContainerRef + ) { } + + isAuthCondition: boolean; + + @Input() set appAuthcheck(isAuthCondition: boolean) { + this.isAuthCondition = isAuthCondition; + } + + ngOnInit() { + const authVal = this.authService.isAuth; + if (authVal && this.isAuthCondition || !authVal && !this.isAuthCondition) { + this.viewContainer.createEmbeddedView(this.templateRef); + } else { + this.viewContainer.clear(); + } + } +} diff --git a/src/app/app.component.spec.ts b/src/app/app.component.spec.ts index 4ae34378f..42daa442a 100644 --- a/src/app/app.component.spec.ts +++ b/src/app/app.component.spec.ts @@ -17,6 +17,7 @@ import { LoadingComponent } from './components/utility/loading/loading.component import { ConfirmComponent } from './components/utility/confirm/confirm.component'; import { ModalComponent } from './components/utility/modal/modal.component'; import { NO_ERRORS_SCHEMA } from '@angular/core'; +import { AuthcheckDirective } from './Directives/authcheck.directive'; describe('AppComponent', () => { @@ -34,7 +35,8 @@ describe('AppComponent', () => { ToastComponent, LoadingComponent, ConfirmComponent, - HomemainComponent + HomemainComponent, + AuthcheckDirective ], imports: [ RouterTestingModule, diff --git a/src/app/components/about/about.component.spec.ts b/src/app/components/about/about.component.spec.ts index 2b00f5b12..fdb26af8a 100644 --- a/src/app/components/about/about.component.spec.ts +++ b/src/app/components/about/about.component.spec.ts @@ -9,6 +9,7 @@ import { FooterComponent } from '../../components/nav/footer/footer.component'; import { ActivatedRoute, Router } from '@angular/router'; import { RouterTestingModule } from '@angular/router/testing'; import { HttpClientModule } from '@angular/common/http'; +import { AuthcheckDirective } from '../../Directives/authcheck.directive'; describe('AboutComponent', () => { let component: AboutComponent; @@ -18,7 +19,7 @@ describe('AboutComponent', () => { } as ActivatedRoute; beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ AboutComponent, HeaderStaticComponent, FooterComponent ], + declarations: [ AboutComponent, HeaderStaticComponent, FooterComponent, AuthcheckDirective ], providers: [ GlobalService, AuthService, diff --git a/src/app/components/analytics/analytics.component.html b/src/app/components/analytics/analytics.component.html index c7b24a69b..45f452d3d 100644 --- a/src/app/components/analytics/analytics.component.html +++ b/src/app/components/analytics/analytics.component.html @@ -1,13 +1,13 @@ - +
- +
- + diff --git a/src/app/components/analytics/analytics.component.spec.ts b/src/app/components/analytics/analytics.component.spec.ts index c773d9353..f30bec949 100644 --- a/src/app/components/analytics/analytics.component.spec.ts +++ b/src/app/components/analytics/analytics.component.spec.ts @@ -12,6 +12,7 @@ import {Routes} from '@angular/router'; import {NotFoundComponent} from '../not-found/not-found.component'; import {ApiService} from '../../services/api.service'; import {HeaderStaticComponent} from '../nav/header-static/header-static.component'; +import { AuthcheckDirective } from '../../Directives/authcheck.directive'; const routes: Routes = [ { @@ -37,7 +38,7 @@ describe('AnalyticsComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ AnalyticsComponent, SideBarComponent, FooterComponent, HeaderStaticComponent, - NotFoundComponent ], + NotFoundComponent, AuthcheckDirective ], providers: [AuthService, GlobalService, EndpointsService, ApiService], imports: [HttpClientModule, RouterTestingModule.withRoutes(routes)] }) diff --git a/src/app/components/auth/auth.component.spec.ts b/src/app/components/auth/auth.component.spec.ts index c7c24eafb..de780d945 100644 --- a/src/app/components/auth/auth.component.spec.ts +++ b/src/app/components/auth/auth.component.spec.ts @@ -8,13 +8,14 @@ import { EndpointsService } from '../../services/endpoints.service'; import { NO_ERRORS_SCHEMA } from '@angular/core'; import { ApiService } from '../../services/api.service'; import { HttpClientModule } from '@angular/common/http'; +import { AuthcheckDirective } from '../../Directives/authcheck.directive'; describe('AuthComponent', () => { let component: AuthComponent; let fixture: ComponentFixture; beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ AuthComponent, HeaderStaticComponent ], + declarations: [ AuthComponent, HeaderStaticComponent, AuthcheckDirective ], providers: [ GlobalService, AuthService, diff --git a/src/app/components/challenge-create/challenge-create.component.html b/src/app/components/challenge-create/challenge-create.component.html index f9fdd24d3..607f40909 100644 --- a/src/app/components/challenge-create/challenge-create.component.html +++ b/src/app/components/challenge-create/challenge-create.component.html @@ -1,4 +1,4 @@ - +
@@ -47,8 +47,8 @@
- +
- + diff --git a/src/app/components/challenge-create/challenge-create.component.spec.ts b/src/app/components/challenge-create/challenge-create.component.spec.ts index 62a18f58c..1aeb9f955 100644 --- a/src/app/components/challenge-create/challenge-create.component.spec.ts +++ b/src/app/components/challenge-create/challenge-create.component.spec.ts @@ -14,6 +14,7 @@ import { HttpClientModule } from '@angular/common/http'; import {Router, Routes} from '@angular/router'; import {NotFoundComponent} from '../not-found/not-found.component'; import {FormsModule} from '@angular/forms'; +import { AuthcheckDirective } from '../../Directives/authcheck.directive'; const routes: Routes = [ { @@ -38,7 +39,7 @@ describe('ChallengecreateComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ ChallengeCreateComponent, HeaderStaticComponent, FooterComponent, NotFoundComponent ], + declarations: [ ChallengeCreateComponent, HeaderStaticComponent, FooterComponent, NotFoundComponent, AuthcheckDirective ], schemas: [ NO_ERRORS_SCHEMA ], imports: [ RouterTestingModule.withRoutes(routes), HttpClientModule, FormsModule], providers: [ GlobalService, AuthService, ApiService, ChallengeService, EndpointsService ] diff --git a/src/app/components/challenge/challenge.component.html b/src/app/components/challenge/challenge.component.html index 8a747bd30..c7675a55a 100644 --- a/src/app/components/challenge/challenge.component.html +++ b/src/app/components/challenge/challenge.component.html @@ -1,4 +1,4 @@ - +
@@ -152,7 +152,7 @@
- + - + diff --git a/src/app/components/challenge/challenge.component.spec.ts b/src/app/components/challenge/challenge.component.spec.ts index 795992a0d..ec82a43dd 100644 --- a/src/app/components/challenge/challenge.component.spec.ts +++ b/src/app/components/challenge/challenge.component.spec.ts @@ -26,6 +26,7 @@ import { Router, ActivatedRoute } from '@angular/router'; import { Observable, of } from 'rxjs'; import { MatTableModule } from '@angular/material'; import { FormsModule } from '@angular/forms'; +import { AuthcheckDirective } from '../../Directives/authcheck.directive'; describe('ChallengeComponent', () => { let component: ChallengeComponent; @@ -53,7 +54,8 @@ describe('ChallengeComponent', () => { ForceloginComponent, FooterComponent, TeamlistComponent, - SelectphaseComponent + SelectphaseComponent, + AuthcheckDirective ], providers: [ ApiService, diff --git a/src/app/components/contact/contact.component.spec.ts b/src/app/components/contact/contact.component.spec.ts index 1c40c4200..6c1e7c457 100644 --- a/src/app/components/contact/contact.component.spec.ts +++ b/src/app/components/contact/contact.component.spec.ts @@ -16,6 +16,7 @@ import { RouterTestingModule } from '@angular/router/testing'; import Global = NodeJS.Global; import { FormsModule } from '@angular/forms'; import { OwlDateTimeModule } from 'ng-pick-datetime'; +import { AuthcheckDirective } from '../../Directives/authcheck.directive'; const routes: Routes = [ { @@ -44,7 +45,7 @@ describe('ContactComponent', () => { const MOCK_SERVICE = new MockWindowService(null); TestBed.configureTestingModule({ imports: [ HttpClientModule, RouterTestingModule.withRoutes(routes), FormsModule, OwlDateTimeModule ], - declarations: [ ContactComponent, HeaderStaticComponent, InputComponent, ToastComponent, FooterComponent ], + declarations: [ ContactComponent, HeaderStaticComponent, InputComponent, ToastComponent, FooterComponent, AuthcheckDirective ], providers: [ GlobalService, AuthService, diff --git a/src/app/components/dashboard/dashboard.component.html b/src/app/components/dashboard/dashboard.component.html index a33dbaf49..cc69819c0 100644 --- a/src/app/components/dashboard/dashboard.component.html +++ b/src/app/components/dashboard/dashboard.component.html @@ -1,4 +1,4 @@ - +
@@ -6,9 +6,9 @@
- +
- + diff --git a/src/app/components/dashboard/dashboard.component.spec.ts b/src/app/components/dashboard/dashboard.component.spec.ts index 01905e067..47b064ca2 100644 --- a/src/app/components/dashboard/dashboard.component.spec.ts +++ b/src/app/components/dashboard/dashboard.component.spec.ts @@ -14,6 +14,7 @@ import {Router, Routes} from '@angular/router'; import {NotFoundComponent} from '../not-found/not-found.component'; import {LoginComponent} from '../auth/login/login.component'; import {FormsModule} from '@angular/forms'; +import { AuthcheckDirective } from '../../Directives/authcheck.directive'; const routes: Routes = [ @@ -44,7 +45,7 @@ describe('DashboardComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ DashboardComponent, FooterComponent, HeaderStaticComponent, NotFoundComponent, LoginComponent ], + declarations: [ DashboardComponent, FooterComponent, HeaderStaticComponent, NotFoundComponent, LoginComponent, AuthcheckDirective ], imports: [ HttpClientModule, RouterTestingModule.withRoutes(routes), FormsModule ], providers: [ GlobalService, AuthService, EndpointsService, ApiService], schemas: [ NO_ERRORS_SCHEMA ] diff --git a/src/app/components/get-involved/get-involved.component.spec.ts b/src/app/components/get-involved/get-involved.component.spec.ts index 1c5ea513a..6b5e530f8 100644 --- a/src/app/components/get-involved/get-involved.component.spec.ts +++ b/src/app/components/get-involved/get-involved.component.spec.ts @@ -9,6 +9,7 @@ import { FooterComponent } from '../../components/nav/footer/footer.component'; import { RouterTestingModule } from '@angular/router/testing'; import { ApiService } from '../../services/api.service'; import { HttpClientModule } from '@angular/common/http'; +import { AuthcheckDirective } from '../../Directives/authcheck.directive'; describe('GetInvolvedComponent', () => { let component: GetInvolvedComponent; @@ -21,7 +22,7 @@ describe('GetInvolvedComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ GetInvolvedComponent, HeaderStaticComponent, FooterComponent ], + declarations: [ GetInvolvedComponent, HeaderStaticComponent, FooterComponent, AuthcheckDirective ], providers: [ GlobalService, AuthService, diff --git a/src/app/components/home/home.component.spec.ts b/src/app/components/home/home.component.spec.ts index 2cedee8bd..5e8cf8872 100644 --- a/src/app/components/home/home.component.spec.ts +++ b/src/app/components/home/home.component.spec.ts @@ -17,6 +17,7 @@ import { FeaturedChallengesComponent } from './featured-challenges/featured-chal import { TwitterFeedComponent } from './twitter-feed/twitter-feed.component'; import { NO_ERRORS_SCHEMA } from '@angular/core'; import { WindowService } from '../../services/window.service'; +import { AuthcheckDirective } from '../../Directives/authcheck.directive'; describe('HomeComponent', () => { let component: HomeComponent; @@ -36,7 +37,8 @@ describe('HomeComponent', () => { RulesComponent, TestimonialsComponent, FeaturedChallengesComponent, - TwitterFeedComponent + TwitterFeedComponent, + AuthcheckDirective ], providers: [ GlobalService, diff --git a/src/app/components/nav/header-static/header-static.component.html b/src/app/components/nav/header-static/header-static.component.html index 4dee85d4c..88393c6e2 100644 --- a/src/app/components/nav/header-static/header-static.component.html +++ b/src/app/components/nav/header-static/header-static.component.html @@ -4,22 +4,22 @@ @@ -32,15 +32,15 @@
  • Home
  • -
  • All Challenges
  • -
  • Sign Up
  • -
  • Log In
  • +
  • All Challenges
  • +
  • Sign Up
  • +
  • Log In
  • -
  • Dashboard
  • -
  • All Challenges
  • -
  • Participant Teams
  • -
  • Create Challenge
  • -
  • Hi {{user.username}}!
  • +
  • Dashboard
  • +
  • All Challenges
  • +
  • Participant Teams
  • +
  • Create Challenge
  • +
  • Hi {{user.username}}!
  • diff --git a/src/app/components/nav/header-static/header-static.component.spec.ts b/src/app/components/nav/header-static/header-static.component.spec.ts index e565049ae..b55b9cc87 100644 --- a/src/app/components/nav/header-static/header-static.component.spec.ts +++ b/src/app/components/nav/header-static/header-static.component.spec.ts @@ -7,6 +7,7 @@ import { HeaderStaticComponent } from './header-static.component'; import { ActivatedRoute, Router } from '@angular/router'; import { ApiService } from '../../../services/api.service'; import { HttpClientModule } from '@angular/common/http'; +import { AuthcheckDirective } from '../../../Directives/authcheck.directive'; describe('HeaderStaticComponent', () => { let component: HeaderStaticComponent; @@ -17,7 +18,7 @@ describe('HeaderStaticComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ HeaderStaticComponent ], + declarations: [ HeaderStaticComponent, AuthcheckDirective ], providers: [ GlobalService, AuthService, ApiService, diff --git a/src/app/components/our-team/our-team.component.spec.ts b/src/app/components/our-team/our-team.component.spec.ts index d4b405240..3bae68826 100644 --- a/src/app/components/our-team/our-team.component.spec.ts +++ b/src/app/components/our-team/our-team.component.spec.ts @@ -10,6 +10,7 @@ import { EndpointsService } from '../../services/endpoints.service'; import { NO_ERRORS_SCHEMA } from '@angular/core'; import { ApiService } from '../../services/api.service'; import { HttpClientModule } from '@angular/common/http'; +import { AuthcheckDirective } from '../../Directives/authcheck.directive'; describe('OurTeamComponent', () => { let component: OurTeamComponent; @@ -22,7 +23,7 @@ describe('OurTeamComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ OurTeamComponent, FooterComponent, HeaderStaticComponent ], + declarations: [ OurTeamComponent, FooterComponent, HeaderStaticComponent, AuthcheckDirective ], imports: [ HttpClientModule, RouterTestingModule ], providers: [ GlobalService, AuthService, EndpointsService, ApiService], schemas: [ NO_ERRORS_SCHEMA ] diff --git a/src/app/components/privacy-policy/privacy-policy.component.spec.ts b/src/app/components/privacy-policy/privacy-policy.component.spec.ts index 7fe7623ea..f11f25412 100644 --- a/src/app/components/privacy-policy/privacy-policy.component.spec.ts +++ b/src/app/components/privacy-policy/privacy-policy.component.spec.ts @@ -11,6 +11,7 @@ import { FooterComponent } from '../../components/nav/footer/footer.component'; import { RouterTestingModule } from '@angular/router/testing'; import { By } from '@angular/platform-browser'; import { DebugElement } from '@angular/core'; +import { AuthcheckDirective } from '../../Directives/authcheck.directive'; describe('PrivacyPolicyComponent', () => { @@ -26,7 +27,7 @@ describe('PrivacyPolicyComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ PrivacyPolicyComponent, HeaderStaticComponent, FooterComponent ], + declarations: [ PrivacyPolicyComponent, HeaderStaticComponent, FooterComponent, AuthcheckDirective ], providers: [ GlobalService, AuthService, diff --git a/src/app/components/profile/profile.component.spec.ts b/src/app/components/profile/profile.component.spec.ts index e9060aaaa..691defa0a 100644 --- a/src/app/components/profile/profile.component.spec.ts +++ b/src/app/components/profile/profile.component.spec.ts @@ -15,6 +15,7 @@ import {Router, Routes} from '@angular/router'; import {NotFoundComponent} from '../not-found/not-found.component'; import {LoginComponent} from '../auth/login/login.component'; import {FormsModule} from '@angular/forms'; +import { AuthcheckDirective } from '../../Directives/authcheck.directive'; const routes: Routes = [ @@ -45,7 +46,7 @@ describe('ProfileComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ ProfileComponent, HeaderStaticComponent, FooterComponent, NotFoundComponent, LoginComponent ], + declarations: [ ProfileComponent, HeaderStaticComponent, FooterComponent, NotFoundComponent, LoginComponent, AuthcheckDirective ], providers: [ GlobalService, AuthService, WindowService, ApiService, EndpointsService], imports: [ HttpClientModule, RouterTestingModule.withRoutes(routes), FormsModule ], schemas: [ NO_ERRORS_SCHEMA ] diff --git a/src/app/components/publiclists/challengelist/challengelist.component.spec.ts b/src/app/components/publiclists/challengelist/challengelist.component.spec.ts index e6ea75ce5..8c011d8bd 100644 --- a/src/app/components/publiclists/challengelist/challengelist.component.spec.ts +++ b/src/app/components/publiclists/challengelist/challengelist.component.spec.ts @@ -16,6 +16,7 @@ import {Router, Routes} from '@angular/router'; import {PubliclistsComponent} from '../publiclists.component'; import {By} from '@angular/platform-browser'; +import { AuthcheckDirective } from '../../../Directives/authcheck.directive'; const routes: Routes = [ { @@ -43,7 +44,7 @@ describe('ChallengelistComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ imports: [ HttpClientModule, RouterTestingModule.withRoutes(routes) ], - declarations: [ ChallengelistComponent, + declarations: [ ChallengelistComponent, AuthcheckDirective, CardlistComponent, ChallengecardComponent, ForceloginComponent, diff --git a/src/app/components/publiclists/publiclists.component.html b/src/app/components/publiclists/publiclists.component.html index ae92d8104..23a92b141 100644 --- a/src/app/components/publiclists/publiclists.component.html +++ b/src/app/components/publiclists/publiclists.component.html @@ -1,13 +1,13 @@ - +
    - +
    - + diff --git a/src/app/components/publiclists/publiclists.component.spec.ts b/src/app/components/publiclists/publiclists.component.spec.ts index 0b81f711e..83be192b2 100644 --- a/src/app/components/publiclists/publiclists.component.spec.ts +++ b/src/app/components/publiclists/publiclists.component.spec.ts @@ -13,6 +13,7 @@ import {NotFoundComponent} from '../not-found/not-found.component'; import {ApiService} from '../../services/api.service'; import {HttpClientModule} from '@angular/common/http'; import {FormsModule} from '@angular/forms'; +import { AuthcheckDirective } from '../../Directives/authcheck.directive'; const routes: Routes = [ @@ -55,7 +56,7 @@ describe('PubliclistsComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ imports: [ RouterTestingModule.withRoutes(routes), HttpClientModule, FormsModule ], - declarations: [ PubliclistsComponent, ChallengelistComponent, TeamlistComponent, NotFoundComponent ], + declarations: [ PubliclistsComponent, ChallengelistComponent, TeamlistComponent, NotFoundComponent, AuthcheckDirective ], providers: [ GlobalService, EndpointsService, AuthService, ApiService ], schemas: [ NO_ERRORS_SCHEMA ] }) diff --git a/src/app/components/publiclists/teamlist/teamlist.component.spec.ts b/src/app/components/publiclists/teamlist/teamlist.component.spec.ts index 88e98c66d..1bd999d19 100644 --- a/src/app/components/publiclists/teamlist/teamlist.component.spec.ts +++ b/src/app/components/publiclists/teamlist/teamlist.component.spec.ts @@ -15,6 +15,7 @@ import {PubliclistsComponent} from '../publiclists.component'; import {By} from '@angular/platform-browser'; import {FormsModule} from '@angular/forms'; import {NotFoundComponent} from '../../not-found/not-found.component'; +import { AuthcheckDirective } from '../../../Directives/authcheck.directive'; const routes: Routes = [ @@ -44,7 +45,7 @@ describe('TeamlistComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [ TeamlistComponent, NotFoundComponent], + declarations: [ TeamlistComponent, NotFoundComponent, AuthcheckDirective], providers: [ GlobalService, ApiService, AuthService, ChallengeService, EndpointsService ], imports: [ RouterTestingModule.withRoutes(routes), HttpClientModule, FormsModule ], schemas: [ NO_ERRORS_SCHEMA ] diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index 91748df5d..51ce44b7d 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -6,6 +6,7 @@ import { FormsModule } from '@angular/forms'; // import directive import { PasswordMismatchValidatorDirective } from '../Directives/password.validator'; import { EmailValidatorDirective } from '../Directives/email.validator'; +import { AuthcheckDirective } from '../Directives/authcheck.directive'; // import component import { HeaderStaticComponent } from '../components/nav/header-static/header-static.component'; @@ -21,7 +22,8 @@ import { UtilityModule } from '../components/utility/utility.module'; EmailValidatorDirective, HeaderStaticComponent, FooterComponent, - NotFoundComponent + NotFoundComponent, + AuthcheckDirective ], imports: [ CommonModule, @@ -38,7 +40,8 @@ import { UtilityModule } from '../components/utility/utility.module'; HeaderStaticComponent, FooterComponent, UtilityModule, - NotFoundComponent + NotFoundComponent, + AuthcheckDirective ] }) export class SharedModule { }