@@ -22,10 +22,10 @@ import { Component, OnInit, ElementRef, Renderer2, Input } from '@angular/core';
22
22
` ]
23
23
} )
24
24
export class ProceduralDashboardComponent implements OnInit {
25
- @Input ( ) dashboardId : string = '1' ;
26
- @Input ( ) withTitle : string = ' true' ;
27
- @Input ( ) withDownloads : string = ' false' ;
28
- @Input ( ) drills : string = ' true' ;
25
+ @Input ( ) dashboardId : number = 1 ;
26
+ @Input ( ) withTitle : boolean = true ;
27
+ @Input ( ) withDownloads : boolean = false ;
28
+ @Input ( ) drills : boolean = true ;
29
29
30
30
constructor ( private elementRef : ElementRef , private renderer : Renderer2 ) { }
31
31
@@ -37,10 +37,10 @@ export class ProceduralDashboardComponent implements OnInit {
37
37
const container = this . elementRef . nativeElement . querySelector ( '#metabase-container' ) ;
38
38
if ( container ) {
39
39
const dashboard = this . renderer . createElement ( 'metabase-dashboard' ) ;
40
- this . renderer . setAttribute ( dashboard , 'dashboard-id' , this . dashboardId ) ;
41
- this . renderer . setAttribute ( dashboard , 'with-title' , this . withTitle ) ;
42
- this . renderer . setAttribute ( dashboard , 'with-downloads' , this . withDownloads ) ;
43
- this . renderer . setAttribute ( dashboard , 'drills' , this . drills ) ;
40
+ this . renderer . setAttribute ( dashboard , 'dashboard-id' , String ( this . dashboardId ) ) ;
41
+ this . renderer . setAttribute ( dashboard , 'with-title' , String ( this . withTitle ) ) ;
42
+ this . renderer . setAttribute ( dashboard , 'with-downloads' , String ( this . withDownloads ) ) ;
43
+ this . renderer . setAttribute ( dashboard , 'drills' , String ( this . drills ) ) ;
44
44
this . renderer . appendChild ( container , dashboard ) ;
45
45
}
46
46
}
0 commit comments