Skip to main content

Templates

HTML Templates are based on Handlebar framework and can be easily configured with in the View classes. See com.sabre.redapp.example3.web.handlebar for details on how to work with handlebar.

import {Template} from 'sabre-ngv-core/decorators/classes/view/Template';
import AbstractView = app.AbstractView;
import AbstractModel = app.AbstractModel;

Template('sabre-sample-module:SampleTemplate')
export class SampleModal *extends* AbstractView<AbstractModel> {
}

Handlebars templates look like regular HTML with embedded handlebars expressions.

<div class="entry">
  <h1>{{title}}</h1>
  <div class="body">
    {{body}}
  </div>
</div>

For more details refer to   Adding Modal Window to Tile Widget and visit http://handlebarsjs.com/