Forum Discussion

prateekraina's avatar
prateekraina
Memorable Member
8 years ago

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 to hard code the page name.

 this.report.on('loaded', function () {
              this.report.getPages().then(function (pages) {
                                pages[1].setActive();
              });
                        });




Error Received: ERROR TypeError: Cannot read property 'getPages' of undefined

 

Can anyone help me in resolving it. 

 

Prateek Raina