on 2020 May 31 8:00 PM
In a controller.js file, I want to reference a BaseController situated in another place. So at the top of the controller.js file I used:
sap.ui.define([
"../../controller/BaseController.controller",
"sap/ui/core/mvc/Controller",
"sap/ui/core/UIComponent"
], function (BaseController, Controller, UIComponent) {
But get a status 404 not found when loading the BaseContriller. the path for the file is indeed wrong: https://sapui5.hana.ondemand.com/resources/.../controller/BaseController.controller.js
Any idea how to get it right ?
Request clarification before answering.
Normally the basecontroller has no .controller.js extension but only .js. If that is also the case in your project, you just have to define the basecontroller without the .controller part. Like this:
"../../controller/BaseController”
Hope it helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Strange, try to compare with the basecontroller in this project: https://github.com/lemaiwo/UI5Con2019/tree/master/webapp/controller
(this is from one of the templates in Web IDE)
User | Count |
---|---|
85 | |
12 | |
9 | |
8 | |
8 | |
5 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.