UNPKG

server_side_dijit

Version:

Middleware plugin for Connect that renders dijit widget templates, which are normally rendered client-side, on the server. Returned pages are modified to include the generated server-side templates inline, with a client-side JavaScript plugin to hook up the templates to the widget.

11 lines (10 loc) 458 B
define(["dojo/_base/declare", "dijit/_WidgetBase", "dijit/_TemplatedMixin", "dijit/_WidgetsInTemplateMixin", "dojo/text!./sample.html"], function (declare, _WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, template) { return declare([_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin], { templateString: template, click: function () { console.log("Clicked..."); } }); } );