I've watched some videos on the topic of backbone js. This is an example straight from the video. It is from 2012, so I'm thinking backbone rules/library have changed, but I can't figure out why this does not work at the moment. In the...
I want to do something like this:  <script id="tmpl-books" type="text/template">   <ul>     <% for (var i = 0; i < books.length; i++) { %>       <% var book = books[i]; %>       <li>       <em>&l...
Need some opinions on the best way to manage templating in Underscore. I'm building a Backbone app and using Underscore to manage the templates. I started off by doing something like this in a 'template.js' file.  templates = {     templa...
UPDATE :  I have got my code working, of sorts, but I have two issues and one problem I am not sure how to fix. I will post my current code below. One The Clients append to the right section within the  TimesheetData  template. But it wraps the  opti...
I'm using the Underscore template (which is based on John Resig's Microtemplate) and whenever I try to replace line breaks inside of it, I get strange behaviors. For example, if I have text like this:  var message = 'Line1\r\n\r\nLine2...
I've written an app using Yeoman and backbone.js. At the top of every js file I have specified 'use strict'; and when I run my grunt tasks jshint does not encounter any errors.   I am able to build my app with grunt without issue however...
I had to replace the default underscore teplating delimiters/Interpolate regex for compatibility with asp.net webforms.From the website i opted for mustache like syntax  _.templateSettings = {   interpolate : /\{\{(.+?)\}\}/g };   tried this  _.templ...
I have HTML template files (underscore template syntax) These files are saved in HTML format so they would be easy to edit (IDE syntax highlight) I don't want to fetch them with ajax, but rather combine them all and include them as ajs file. Usi...
Both seem to be doing very similar things, in a similar way.    Both let you embed javascript into the templates, and have the same 3 types of tags -unescaped replace, escaped replace, embed js-. Both have the ability to 'precomile' the temp...
I'm having an issue where JavaScript operators in my UnderscoreJS Template are escaped and therefore unusable.  Escaped characters that I found are &&, >, <.  I've looked for another similar issue but couldn't find any.  Whe...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.