Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what type of component to embed. Configuration Issue #1

Open
ravikzm opened this issue Sep 23, 2017 · 5 comments
Open

what type of component to embed. Configuration Issue #1

ravikzm opened this issue Sep 23, 2017 · 5 comments
Assignees
Labels

Comments

@ravikzm
Copy link

ravikzm commented Sep 23, 2017

Hi,
I am trying to use the PowerBI-Angular2 to display the Power BI embedded one and getting the below error.

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)

I am using Angular 4 x and here is the system configuration mapping.

'angular2-powerbi': 'npm:angular2-powerbi/angular2-powerbi.umd.js',
'traceur': 'npm:traceur/src/traceur.js',
'powerbi-client': 'npm:powerbi-client/dist/powerbi.js',
[ <powerbi-component [embedUrl]="reportEmbedUrl"
                                   [accessToken]="embedToken" type="report" [id]="reportId"></powerbi-component> ]

Please help me to resolve the issue

@diego-d5000
Copy link
Owner

diego-d5000 commented Sep 23, 2017

This problem occurs when "type" prop is not present in the component. Does the error appears at the beginning or when you switch the embedded resource (when you change your reportEmbedUrl and embedToken vars) ?

Thanks

@diego-d5000
Copy link
Owner

I found the bug. It will be resolved ASAP. Thanks

@diego-d5000 diego-d5000 self-assigned this Sep 24, 2017
@ravikzm
Copy link
Author

ravikzm commented Sep 24, 2017

The issue having at beginning itself.

@ravikzm
Copy link
Author

ravikzm commented Oct 17, 2017

Can you please let me know whether the issue is fixed or not yet.

@Bharathjraj
Copy link

You can set the value of report type as "report" into a variable and bind to html, when ever your assigning the values for other variables like embedUrl and so... As the power bi librariry always checks for the changed value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants