search
chevron_right
chevron_right
chevron_right
chevron_right
chevron_right
chevron_right
chevron_right
chevron_right
chevron_right
chevron_right
chevron_right
chevron_right
chevron_right
Concepts
chevron_right
Types
chevron_right
Advanced
chevron_right
chevron_right
chevron_right
A view is rendered using the method viewResult
. The viewResult accepts two parameters -
- view identification - view location or view name or id
- model
Let's see an example -
export class DefaultController extends Controller {
@DefaultWorker()
async default() {
const model = {
title: 'FortJs'
}
const result = await viewResult('default/index.html',model);
return result;
}
}
By default fortjs provides mustache as view engine. But any view engine like - handlebar, ejs etc can be used.
For configuring other view engine, please read the docs - viewEngine

Created with by Ujjwal Gupta
Help fortjs Grow
fortjs is an open source project and completely free to use. However, the amount of effort needed to maintain and develop new features for the project is not sustainable without proper financial backing.
Need Help
Dont worry, if something is not working for you. The whole community is here for you.
Community
Be a part of fortjs community and help other people in learning fortjs, using it in a best way and making fortjs better.