cancel
Showing results for 
Search instead for 
Did you mean: 

Error : Control with ID App could not be found - EventProvider sap.m.routing.Target

former_member185241
Active Participant
0 Kudos

Hello Experts,

I am facing issue in Routing.

My Menifest.js is like below:

"routing" : {

  "config" : {

  "routerClass": "sap.m.routing.Router",

  "viewType": "XML",

  "viewPath": "NewProj.view",

  "controlId": "App",

  "targetControl" : "App",

  "controlAggregation": "pages",

  "transition": "slide"

  },

  "routes" :[

  {

  "pattern": "",

  "name": "Home",

  "target": "Home"

  }

  ],

  "targets" :{

  "Home" : {

  "viewName" : "Home",

  "viewLevel" : 0

  }

  }

}

And rootview is defined as

"rootView": {

  "viewName": "NewProj.view.Home",

  "type": "XML"

  },

I have App.view.xml view:

<mvc:View

  controllerName="NewProj.controller.App"

  xmlns:html="http://www.w3.org/1999/xhtml"

  xmlns:mvc="sap.ui.core.mvc"

  xmlns="sap.m">

  <App id = "App">

  </App>

</mvc:View>

On run I am getting below errors:

Control with ID App could not be found - EventProvider sap.m.routing.Target

UIComponent.js:6 Uncaught TypeError: Cannot read property 'oTargetControl' of undefined

Thanks,

Abhishek

Accepted Solutions (1)

Accepted Solutions (1)

jamie_cawley
Advisor
Advisor

Set your rootview view name to

"viewName": "NewProj.view.App",


Regards

Jamie

SAP - Technology RIG

Answers (0)