javascript - Issue in using template in the view in backbone.js -
i have question related backbone.js , need help. cannot understand difference between:
currentcustomerstemplate : currentcustomerstemplate, maincustomertemplate : _.template(maincustomertemplate),
i mean template _.
, 1 not have it! suppose have form (customer form) , inside form want make (separate) forms related each customer. every time add customer button information each 1 goes currentcustomer
form , "in" main customerform
. (can multiple tables inside bigger table). have 2 templates. whats difference of first , second?
_.template () 'compiles' raw template template object , can provide different parameters 'compiling'. can read underscore template doc in here more details.
by following said, "currentcustomerstemplate" should have been compiled before , template object. should see in somewhere prior being referred , there must _.template() being called already.
Comments
Post a Comment