chinadci / google-jstemplate Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/google-jstemplate
License: Apache License 2.0
Automatically exported from code.google.com/p/google-jstemplate
License: Apache License 2.0
$top is very useful, but not mentioned anywhere in the reference
documentation on the website. It is mentioned in the slideshow, though.
Should add it to the reference documentation.
Original issue reported on code.google.com by [email protected]
on 8 Jan 2009 at 6:56
For data:
var tplData = {username:"Jane User",
addresses:{
primary: {location:"111 8th Av.", label:"NYC front door"},
2: {location:"76 9th Av.", label:"NYC back door"},
3: {location:"Mountain View", label:"Mothership"}
}
};
It should be possible to loop over addresses with jsselect.
Not sure if $index should contain the property name or they should be
additional $key variable.
Original issue reported on code.google.com by [email protected]
on 29 Nov 2012 at 12:38
What steps will reproduce the problem?
1. use a jsselect inside a <form>, on an <input>. The <input> should have
a constant 'name' attribute, such that document.formxx.field_name is an
array of fields with that name. (See attached html file.)
2. call jstProcess on the form, to duplicate that field several times.
3. compare document order and the order in the formxx.field_name array.
Expected: The two alerts should be the same, in my test page.
Actual: As RAtM (and Luke) said, "the last shall be first".
I'm using svn r9, FF3/Ubuntu8.04.
It is very common for apps to use document.formxx.field_name[n] where more
than one field has the same name 'field_name'. Referenced through
formxx.field_name, these fields are in order by how early they were created
(chronologically), *not* in document order. jsselect's use of
domInsertBefore shifts the order backwards 1 slot, placing the 0'th element
at the end of the form.name array.
Original issue reported on code.google.com by [email protected]
on 20 Sep 2008 at 9:01
Attachments:
are there plans to convert this library into RequireJS AMD
(http://requirejs.org/) module ?
Original issue reported on code.google.com by [email protected]
on 27 Jan 2013 at 8:14
What steps will reproduce the problem?
1. Construct a template using something like <span id="template"
jsvalues="$options:'a;b;c'.split(';')"><span jsselect="$options"
jscontent="$this" /></span>
2. call jstProcess(new JsEvalContext({}), document.getElementById('template'))
You should get a stack of three spans <span>a</span>...b...c...
Instead, this template is not processed because the expression dies at ';',
and what's left is a syntax error. I assume this is because the expression
is split with ';' with no regard to string boundaries.
I'm using svn r9, FF3/Ubuntu8.04.
I am working around this by using '|' instead. I can imagine a scenario in
which this workaround would not be practical, though.
Original issue reported on code.google.com by [email protected]
on 30 Sep 2008 at 9:22
util.js has the following comment
// NOTE(mesch): An alternative idiom would be:
//
// eval('(' + expr + ')');
//
// Note that using the square brackets as below, "" evals to undefined.
// The alternative of using parentheses does not work when evaluating
// function literals in IE.
// e.g. eval("(function() {})") returns undefined, and not a function
// object, in IE.
This is correct, but the solution:
return eval('[' + expr + '][0]');
creates an immediately discarded array object even on interpreters that do
not have IE's bug.
An alternative which creates fewer objects is:
return eval('0,(' + expr + ')');
Moving the strings '0,(', and ')' out of the function body will create
fewer string objects too.
Original issue reported on code.google.com by [email protected]
on 12 Jan 2009 at 8:20
it is very complicated to read and understand the examples on
https://code.google.com/p/google-jstemplate/wiki/TemplateProcessingInstructionRe
ference page
the syntax highlighting puts all code on one line
could you pls. fix it ?
Original issue reported on code.google.com by [email protected]
on 26 Feb 2013 at 12:40
Is there really a reason not to provide at least possibility to do it with
awareness that it should not output nodes with js* parameters ?
thx
Original issue reported on code.google.com by [email protected]
on 27 Feb 2013 at 8:28
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.