2017-09-23 8 views
0

PowerBI-Angular2を使用して、以下のエラー。angular2-powerbi:設定の問題設定でタイプを指定するか、 'powerbi-type = "report"'のように属性として指定する必要があります。

errors.ts:42 ERROR Error: Attempted to embed using config {"accessToken":"xxxxx","tokenType":0,"embedUrl":"https://embedded.powerbi.com/appTokenReportEmbed?reportId=xxx","id":"xxxxx"} on element 

, but could not determine what type of component to embed. You must specify a type in the configuration or as an attribute such as 'powerbi-type="report"'. 
at Service.embedNew (service.ts:227) 
at Service.embed (service.ts:210) 
at PowerBIComponentComponent.embed (angular2-powerbi.umd.js:101) 
at PowerBIComponentComponent.ngOnChanges (angular2-powerbi.umd.js:45) 
at checkAndUpdateDirectiveInline (provider.ts:272) 
at checkAndUpdateNodeInline (view.ts:505) 
at checkAndUpdateNode (view.ts:443) 
at prodCheckAndUpdateNode (services.ts:348) 
at Object.eval [as updateDirectives] (xxxComponent.ngfactory.js:971) 
at Object.updateDirectives (services.ts:87) 

私はAngular 4 xを使用していますが、ここではシステム構成のマッピングです。 HTML側

<powerbi-component [embedUrl]="reportEmbedUrl" 
             [accessToken]="embedToken" type="report" [id]="reportId"></powerbi-component> 

答えて

0

'angular2-powerbi': 'npm:angular2-powerbi/angular2-powerbi.umd.js', 
'traceur': 'npm:traceur/src/traceur.js', 
'powerbi-client': 'npm:powerbi-client/dist/powerbi.js', 

あなたはreportEmbedUrlとアクセストークンの値を設定すると、変数の「報告書」として、タイプの値を設定します。パワーbiは毎回変更された値をチェックするので、レポートをロードします。

関連する問題