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.
Hi Marie-Piere,
The answer of c3d1947136cd4c748a7aa794001af496 is the first step. The recommendation is to name only the files which are directly controller of a view with .controller.js. So, in your case:
Also, you have to specify the resourceRoots in the index.html or manifest.json.
All the best!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
12 | |
9 | |
8 | |
7 | |
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.