WebGoat/src/main/webapp/js/goatApp/view/MenuItemView.js
2015-05-19 21:52:44 -04:00

30 lines
532 B
JavaScript

define(['jquery',
'underscore',
'backbone',
'goatApp/support/GoatUtils',
'goatApp/view/MenuItemView'],
function(
$,
_,
Backbone,
GoatUtils,
MenuItemView) {
return Backbone.View.extend({
initialize: function(options) {
options = options || {};
this.items = options.items;
},
render: function() {
var viewItems = [];
for (var i=0;i<this.items.length;i++) {
var listItem = $('<li>',{text:this.items[i].name});
//viewItems
viewItems.push(listItem);
}
return viewItems;
}
});
});