using backbone.js

wiki  and ticket software osticket, twiki

 var Occupant = Backbone.Model.extend();
        var occupant = new Occupant(data);
        var OccupantView = Backbone.View.extend({
            // shortened for brevity..
              //... is a list tag.
            tagName:  "li",
             // Cache the template function for a single item.
            template: _.template($('#tmpl_occupant').html()),
            // a one-to-one correspondence between a **Todo** and a **TodoView** in this
            // app, we set a direct reference on the model for convenience.
            initialize: function() {
                _.bindAll(this, 'render', 'close');
                this.model.bind('change', this.render);
                this.model.view = this;
            // Re-render the contents of the todo item.
            render: function() {
                return this;
        var view = new OccupantView({model: occupant});


Ref :


About rahul23134654

Hi, I am Rahul Meha , B.E. in (I.T.)
This entry was posted in UI Js. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s