The Syncfusion® native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I'm using Angular JS with schedule component. I have a rest api made in asp.net core and I made a client for it in angularjs. I'm trying to get all appointments for the schedule component, however when assigning them to the scope variable that binds to schedule it comes up with an error. I tried googling this error however I haven't found anything useful and I'm not very proficient in angular or javascript yet.When I make an array with appointment objects manually it works, but when I passed it from my appointments service it doesn't. (Also, a bit offtopic but how would I perform CRUD actions for the schedule? Would I use events like "onAppointmentSave" ?)This is the error:angular.js:14525 TypeError: n.sort is not a function
at Object._sortAppById (http://cdn.syncfusion.com/15.1.0.41/js/web/ej.web.all.min.js:10:3533264)
at Object._dataProcessing (http://cdn.syncfusion.com/15.1.0.41/js/web/ej.web.all.min.js:10:3536745)
at Object._bindAppointmentsData (http://cdn.syncfusion.com/15.1.0.41/js/web/ej.web.all.min.js:10:3529006)
at Object._init (http://cdn.syncfusion.com/15.1.0.41/js/web/ej.web.all.min.js:10:3298250)
at Object. (http://cdn.syncfusion.com/15.1.0.41/js/web/ej.web.all.min.js:10:21539)
at r.fn.init.n.fn.(anonymous function) [as ejSchedule] (http://cdn.syncfusion.com/15.1.0.41/js/web/ej.web.all.min.js:10:22796)
at Object.post (http://cdn.syncfusion.com/15.1.0.41/js/common/ej.widget.angular.min.js:10:9542)
at https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js:17:3
at ra (https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js:85:35)
at n (https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js:70:226) ""This is my function to get them from service in controller:appointmentsService.getAppointments().then(function (results) {
$scope.appointments = results.data;
console.log($scope.appointments);
});and then this is my service:(function () {
'use strict';
var app = angular.module("myApp");
app.factory('appointmentsService', ['$http', function($http) {
var serviceBase = 'http://localhost:63185/';
var appointmentsServiceFactory = {};
var _getAppointments = function () {
return $http.get(serviceBase + 'api/appointments').then(function (results) {
return results;
});
};
appointmentsServiceFactory.getAppointments = _getAppointments;
return appointmentsServiceFactory;
}]);
}());