UNPKG

wise-web-client

Version:

Based on Spine MVC framework

41 lines (29 loc) 950 B
// StaticPageView.js // A generic view to serve static contents // ------- define(['jquery', 'backbone', 'handlebars', './BaseView' ], function($, Backbone, Handlebars, BaseView) { var View = BaseView.extend({ // The DOM Element associated with this view el: '#page-container', initialize: function(context) { _.extend(this, context); }, // View Event Handlers events: { }, // Renders the view's template to the UI render: function() { var that = this; require(['text!../../../tpl/static/' + this.content + '.hbr'], function(content) { that.$el.html(content); }); return this; } }); // Returns the View class return View; } );