im using backbone JS and im having troubles showing the data from the MODEL.
can anyone know how this works? TIA
VIEW.JS –
render: function() {
///EDITED TO SIMPLIFY
var toModel = new tModel();//tModel is the name of the model
console.log(toModel.get('data'));//?? UNDEFINE
}
MODEL.JS —
data:[
{ text: "Google", href: "http://google.com" },
{ text: "Facebook", href: "http://facebook.com" },
{ text: "Youtube", href: "http://youtube.com" }
],
http://jsfiddle.net/g3U7j/6/
model.js
view.js