Skip to Content
0
Former Member
May 02, 2016 at 06:00 PM

Unncaught TypeError: Cannot read property 'initialize' of undefined

951 Views

Hi experts, I'm facing the error showed below when loading my application, this application, is an simple navigation example, but I don't know What I'm doing wrong.

My code is the follow:

Code of Component.js

init: function() {

UIComponent.prototype.init.apply(this, arguments);

this.getRouter().initialize();

}

Code of Manifest.json (routing)

"routing": {

"config": {

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

"viewType": "XML",

"viewPath": "Nav.view",

"controlId": "app",

"controlAggregation": "pages", "transition": "slide"

},

"routes": [{

"pattern": "", "name": "appHome",

"target": "home"

}], "targets": { "home": { "viewName": "Home", "viewLevel": 1 } }

}

Attachments