Skip to Content
Hello World with a Service

Hello World with a Service example

Hello World example of the Vovk.ts controller with a service.

Result

Code

HelloWorldService.ts
HelloWorldControllerWithService.ts
HelloWorldExampleWithService.tsx
1export default class HelloWorldService {
2 /**
3 * Return a greeting
4 */
5 static getHello() {
6 return { greeting: 'Hello world!' };
7 }
8}
1export default class HelloWorldService {
2 /**
3 * Return a greeting
4 */
5 static getHello() {
6 return { greeting: 'Hello world!' };
7 }
8}
Last updated on