diff --git a/demo/src/app/home/playground/playground.component.ts b/demo/src/app/home/playground/playground.component.ts index 35c80e3..9d23a3e 100644 --- a/demo/src/app/home/playground/playground.component.ts +++ b/demo/src/app/home/playground/playground.component.ts @@ -117,6 +117,9 @@ export class PlaygroundComponent implements OnInit { .get(['cookie.header', 'cookie.message', 'cookie.dismiss', 'cookie.allow', 'cookie.deny', 'cookie.link', 'cookie.policy']) .subscribe(data => { + if(!this.options.content) + this.options.content = {}; + this.options.content.header = data['cookie.header']; this.options.content.message = data['cookie.message']; this.options.content.dismiss = data['cookie.dismiss']; diff --git a/src/model/content-options.ts b/src/model/content-options.ts index e51b227..8928b27 100644 --- a/src/model/content-options.ts +++ b/src/model/content-options.ts @@ -25,5 +25,5 @@ export class NgcContentOptions { target ? = '_blank'; - [key: string]: string; + [key: string]: string | undefined; } diff --git a/src/model/html-elements.ts b/src/model/html-elements.ts index 17d89c3..1937e74 100644 --- a/src/model/html-elements.ts +++ b/src/model/html-elements.ts @@ -20,5 +20,5 @@ export class NgcHTMLElements { close ? = '{{close}}'; - [key: string]: string; + [key: string]: string | undefined; }