-
Notifications
You must be signed in to change notification settings - Fork 0
ODataFactory
Bart Kardol edited this page Mar 31, 2019
·
2 revisions
With the ODataFactory you can create an ODataService. This ODataFactory can be injected in a constructor.
export class AppComponent implements OnInit {
constructor(private factory: ODataFactory) {}
ngOnInit(): void {
// Create a service with the injected factory.
const artistsService = this.factory.CreateService<Artist>("artists");
// Retrieve all artists and log the artists to the console.
artistsService.query().getCollection().subscribe(artists => console.log(artists));
}
}