New error:
Angular Get Error:
http://dnndev.me/DesktopModules/DMAngular8/API/home/GetModuleCTCalls
404 (Not Found)
I implemented the Angular controller like yours in the AngularModule (See snippet)
$dnnuclear.myCTLApp = angular.module('$dnnuclear.myCTLApp', ['dnnuclearDnn']);
$dnnuclear.myCTLApp.controller('mainController', function ($http, $log, AppServiceFramework) {
var vm = this;
// Set API base url
var serviceRoot = AppServiceFramework.getServiceRoot('DMAngular8');
vm.EditMode = true;
vm.calls = [];
vm.regions = [];
vm.EditIndex = -1;
vm.show = 'default';
//Get Calls
$http.get(serviceRoot + 'home/GetModuleCTCalls')
.success(function (results) {
vm.calls = results;
})
.error(function (data) {
console.log(data);
})
vm.addCalls = function () {
vm.show = 'new';
$http.get('/home/GetRegions')
.success(function (results) {
vm.regions = results;
})
.error(function (data) {
console.log(data);
})
}
vm.Cancel = function () {
vm.show = 'default';
}
});
and home controller looks has function:
''' <summary>
''' API that returns an CTCall list
'''[baseURL]/DMAngular8/GetModuleCalls
''' </summary>
''' <returns></returns>
<HttpPost, HttpGet>
<ValidateAntiForgeryToken>
<ActionName("List")>
<DnnModuleAuthorize(AccessLevel:=SecurityAccessLevel.View)>
Public Function GetModuleCTCalls() As HttpResponseMessage
Try
Dim ctcallList = _ctcallRepository.GetCTCalls(ActiveModule.ModuleID)
Return Request.CreateResponse(HttpStatusCode.OK, ctcallList.ToList())
Catch ex As Exception
Return Request.CreateResponse(HttpStatusCode.InternalServerError, ex.Message)
End Try
End Function
Thanks again for help...