Dependency injection (DI)
How It Works
import { autoinject } from 'aurelia-framework';
import { HttpClient } from 'aurelia-fetch-client';
import { EventAggregator } from 'aurelia-event-aggregator';
@autoinject
export class UserService {
constructor(private http: HttpClient, private ea: EventAggregator) {
}
}Key Concepts
In This Section
Last updated
Was this helpful?