mjcee
7 Aug 2017, 12:10 PM
I am having a problem with the sample 'Ext JS Application and Web API' application generated by the latest Visual Studio Plugin, ExtJS 6.5.1 and cmd 6.5.1.240. When I make an Ajax call to an API Controller, the program is looking for the the controller in the localhost:nnnnn/Sencha/Api directory. I expected it to look in the localhost:nnnnn/Api directory.
Here is the code I have inserted into the launch function of Application.js:
Ext.define('ExtApplication.Application', {
extend: 'Ext.app.Application',
name: 'ExtApplication',
quickTips: false,
platformConfig: {
desktop: {
quickTips: true
}
},
launch: function () {
Ext.Ajax.request({
url: 'Api/AccountManager/GetAccountManagerInfo',
scope: this,
callback: this.onAfterAjaxReq
});
},
onAfterAjaxReq: function (options, success, result) {
},
onAppUpdate: function () {
Ext.Msg.confirm('Application Update', 'This application has an update, reload?',
function (choice) {
if (choice === 'yes') {
window.location.reload();
}
}
);
}
});
Attached is the result of running the application showing that it is expecting to find the controller in the Sencha/Api directory rather than the Api directory. What am I doing wrong?
Here is the code I have inserted into the launch function of Application.js:
Ext.define('ExtApplication.Application', {
extend: 'Ext.app.Application',
name: 'ExtApplication',
quickTips: false,
platformConfig: {
desktop: {
quickTips: true
}
},
launch: function () {
Ext.Ajax.request({
url: 'Api/AccountManager/GetAccountManagerInfo',
scope: this,
callback: this.onAfterAjaxReq
});
},
onAfterAjaxReq: function (options, success, result) {
},
onAppUpdate: function () {
Ext.Msg.confirm('Application Update', 'This application has an update, reload?',
function (choice) {
if (choice === 'yes') {
window.location.reload();
}
}
);
}
});
Attached is the result of running the application showing that it is expecting to find the controller in the Sencha/Api directory rather than the Api directory. What am I doing wrong?