diff --git a/src/app/features/spec/components/spec-code/spec-code.component.html b/src/app/features/spec/components/spec-code/spec-code.component.html index ae7d59f..138dfa6 100644 --- a/src/app/features/spec/components/spec-code/spec-code.component.html +++ b/src/app/features/spec/components/spec-code/spec-code.component.html @@ -1 +1 @@ -
{{jsonData | json}}
\ No newline at end of file +
{{jsonData | json}}
\ No newline at end of file diff --git a/src/app/features/spec/components/spec-code/spec-code.component.ts b/src/app/features/spec/components/spec-code/spec-code.component.ts index 1c2122f..b6212fa 100644 --- a/src/app/features/spec/components/spec-code/spec-code.component.ts +++ b/src/app/features/spec/components/spec-code/spec-code.component.ts @@ -9,4 +9,8 @@ import { ChangeDetectionStrategy, Component, Input, ViewEncapsulation } from '@a }) export class SpecCodeComponent { @Input() jsonData: object; + + get hasData(): boolean { + return Object.keys(this.jsonData || {}).length > 0; + } }