Skip to main content
Version: 3.2

Service

Services are the logic layer. Controllers activate functions in services. Many controllers can call the same service.

To define a service you need to create a class that has the @Service decorator.

import {Service} from '@orion-js/services'

@Service()
export class ExampleService {

async getDoc() {
...
}
}