Forum Discussion
prateekraina
8 years agoMemorable Member
Calling getPages() in Angular 4 gives error
Hi, I need to embed a specific page on report load in Angular 4. I am using the following snippet to get pages of the report so that i can then choose a specific page out of those. I don't want ...
v-micsh-msft
8 years agoMicrosoft Employee
The error messages seems a little odd.
Have you installed the Microsoft.PowerBI.JavaScript package?
https://github.com/Microsoft/PowerBI-JavaScript
Besides, try:
report.on('loaded', () => {
report.getPages().then(pages => pages[1].setActive());
});
Regards,
Michael