on 2016 May 02 7:00 PM
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 | ||||||
} | ||||||
} |
} |
Thank you All by response, the problem was, controlId "App", it was not set at rootview.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
did you load RouteMatchedHandler / requiered js for Routing, before calling this.getRouter() ?
Jawad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For some reason the router is not getting initialized.
this.getRouter().initialize();
The error also says
"Missing Type for Model "routing".
Try following:
"viewPath": "Nav.view", Here try giving absolute path
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
66 | |
8 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.