Skip to Content
0
Jun 28, 2016 at 04:08 PM

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

6195 Views

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