cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hello,

I want to navigate through my detail pages in my sapui5 application.

I have tried different ways, I used Target, Router with different functions like:

this.getOwnerComponent().getTargets().display("Detail2");
this.getOwnerComponent().getRouter().navTo("Detail2");
this.getRouter().navTo("Detail2");
this.getRouter().getTargets().display("Detail2");

But in all of them I face with an error that is like:

Uncaught TypeError: Cannot read property 'getTargets' of undefined

Uncaught TypeError: Cannot read property 'getRouter' of undefined

....

Can anyone help me that what can be the problem?

Regards

Sep

0 Likes
View Entire Topic
Former Member
0 Likes

Hi Sep,

Do you have an App .view.xml in ur project?

Has the Routing and targets been defined in the manifest.json file?

Regards,
Srinivasan

sinaei
Contributor
0 Likes

Hi Srinivasan,

Yes, I have App.view.xml in my project but I have done the Routing in Component.js

Regards,

Sin