diff --git a/goofy-client/apps/goofy/src/app/app.component.html b/goofy-client/apps/goofy/src/app/app.component.html index 95ebefa0c4df786aefa4a9917b0ef95f2e9b764b..02b4bca1d24463e1f8421d8996c8c954434f234a 100644 --- a/goofy-client/apps/goofy/src/app/app.component.html +++ b/goofy-client/apps/goofy/src/app/app.component.html @@ -1,7 +1,8 @@ -<ng-container *ngIf="apiRoot | async as _apiRoot"> +<!-- <ng-container *ngIf="apiRoot | async as _apiRoot"> <div> <p>Version: {{ _apiRoot.version }}</p> <p>BuildTime: {{ _apiRoot.buildTime }}</p> <p>JavaVersion: {{ _apiRoot.javaVersion }}</p> </div> </ng-container> + --> \ No newline at end of file diff --git a/goofy-client/apps/goofy/src/app/app.component.spec.ts b/goofy-client/apps/goofy/src/app/app.component.spec.ts index ecc028d6d506227506845e80b088f259e5c6d6d4..3b925ad816a5543b4b87db9a6788c26b809b96b4 100644 --- a/goofy-client/apps/goofy/src/app/app.component.spec.ts +++ b/goofy-client/apps/goofy/src/app/app.component.spec.ts @@ -19,11 +19,4 @@ describe('AppComponent', () => { const app = fixture.componentInstance; expect(app.title).toEqual('goofy'); }); - - it('should render title', () => { - const fixture = TestBed.createComponent(AppComponent); - fixture.detectChanges(); - const compiled = fixture.nativeElement; - expect(compiled.querySelector('h1').textContent).toContain('Welcome to goofy!'); - }); }); diff --git a/goofy-client/apps/goofy/src/app/app.component.ts b/goofy-client/apps/goofy/src/app/app.component.ts index 813686135dc9c67f16cb68903ea23577fe1adfdd..4f240918648af154ba5ccba0c9792fd1620515fc 100644 --- a/goofy-client/apps/goofy/src/app/app.component.ts +++ b/goofy-client/apps/goofy/src/app/app.component.ts @@ -1,7 +1,4 @@ import { Component } from '@angular/core'; -import { ApiRootFacade } from '@goofy-client/api-root-shared'; -import { ApiRootResource } from 'libs/api-root-shared/src/lib/api-root-shared.model'; -import { Observable } from 'rxjs'; @Component({ selector: 'goofy-client-root', @@ -11,9 +8,9 @@ import { Observable } from 'rxjs'; export class AppComponent { title = 'goofy'; - apiRoot: Observable<ApiRootResource>; +/* apiRoot: Observable<ApiRootResource>; constructor(apiRootFacade: ApiRootFacade) { this.apiRoot = apiRootFacade.apiRoot; - } + } */ } \ No newline at end of file diff --git a/goofy-client/libs/api-root-shared/src/lib/api-root-shared.module.ts b/goofy-client/libs/api-root-shared/src/lib/api-root-shared.module.ts index 8d4b50364f66c791d31949f5254c7642fe9a04a5..79009f206fb9fc0ed5534a88604295936f50559e 100644 --- a/goofy-client/libs/api-root-shared/src/lib/api-root-shared.module.ts +++ b/goofy-client/libs/api-root-shared/src/lib/api-root-shared.module.ts @@ -1,3 +1,4 @@ +import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; import { RestModule } from '@ngxp/rest'; import { NgxsModule } from '@ngxs/store'; @@ -7,6 +8,7 @@ import { ApiRootState } from './api-root-shared.state'; @NgModule({ imports: [ + CommonModule, NgxsModule.forFeature([ApiRootState]), RestModule ], diff --git a/goofy-client/libs/environment-shared/src/lib/environment-shared.module.ts b/goofy-client/libs/environment-shared/src/lib/environment-shared.module.ts index 3fc4aab5e770b933b3afe948c1bde576f7c890a4..ad119eed4455a3fdffbb1bf8f10fc45d744136c3 100644 --- a/goofy-client/libs/environment-shared/src/lib/environment-shared.module.ts +++ b/goofy-client/libs/environment-shared/src/lib/environment-shared.module.ts @@ -1,9 +1,14 @@ +import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; import { RestModule } from '@ngxp/rest'; import { NgxsModule } from '@ngxs/store'; import { EnvironmentState } from './environment-shared.state'; @NgModule({ - imports: [NgxsModule.forFeature([EnvironmentState]), RestModule] + imports: [ + CommonModule, + NgxsModule.forFeature([EnvironmentState]), + RestModule + ] }) export class EnvironmentSharedModule {} diff --git a/goofy-client/libs/tech-shared/src/lib/resource/resource.util.ts b/goofy-client/libs/tech-shared/src/lib/resource/resource.util.ts index 3ab0f984f50fa7197ed983d245575a45e871b60e..8118b6795b671de2e95fef4235429ead83d45136 100644 --- a/goofy-client/libs/tech-shared/src/lib/resource/resource.util.ts +++ b/goofy-client/libs/tech-shared/src/lib/resource/resource.util.ts @@ -1,5 +1,3 @@ -import { isNil } from 'lodash-es'; - export interface StateResource<T> { reload: boolean; loaded: boolean; @@ -25,4 +23,8 @@ export function doIfLoadingRequired(stateResource: StateResource<any>, runable: export function isLoadingRequired(stateResource: StateResource<any>): boolean { return !stateResource.loading && (!stateResource.loaded || stateResource.reload); +} + +export function isNil(value: any){ + return value === 'undefined' || value == null; } \ No newline at end of file