I have yet to find decent documentation that details the transition from Angular 1.x to Aurelia. So far I have only seen people describe in detail how the concept of Angular directive can be redone in Aurelia using @customElement . Good, simple enough. But these examples are always, always just mocking the data.
However, Angular Services are singletones that can be entered into any controller / directive / service and usually allow you to receive data from the server (i.e. PersonService , OrdersService ).
But how are these data services modeled in Aurelia? Is this all class? It looks like him .
Essentially, I would see some sample code, hello-world , which efficiently extracts data from a service and provides it with @customElement . Where do the HTTP calls go? How do we even make HTTP calls? Angular uses $http , what about Aurelia?
EDIT :
Here is a simple Angular service. How can this be attacked in Aurelia?
app.service('SomeDataService', function () { return { getMyData: function (options) { return $.ajax(options); } } });
source share