You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
488 B
18 lines
488 B
import {Controller, html, Session} from '@extollo/lib';
|
|
import {Inject, Injectable} from "@extollo/di";
|
|
|
|
@Injectable()
|
|
export class Home extends Controller {
|
|
@Inject()
|
|
protected readonly session!: Session;
|
|
|
|
public welcome() {
|
|
this.session.set('app_visits', this.session.get('app_visits', 0) + 1)
|
|
|
|
return html(`
|
|
<h1>Welcome to Extollo!</h1>
|
|
<h2>You have visited this page ${this.session.get('app_visits')} times.</h2>
|
|
`)
|
|
}
|
|
}
|