Lines Matching refs:template

333 * <a href="#_templatestring-options">`_.template`</a>
3037 `template`, `trim`, `trimEnd`, `trimStart`, and `words`
8634 `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
9638 <h3 id="_templatestring-options"><code>_.template([string=''], [options={}])</code></h3>
9639 …14770 "View in source") [&#x24C3;](https://www.npmjs.com/package/lodash.template "See the npm pack…
9641 Creates a compiled template function that can interpolate data properties
9644 properties may be accessed as free variables in the template. If a setting
9648 **Note:** In the development build `_.template` utilizes
9664 1. `[string='']` *(string)*: The template string.
9668 5. `[options.imports=_.templateSettings.imports]` *(Object)*: An object to import into the template
9670 …options.sourceURL='lodash.templateSources[n]']` *(string)*: The sourceURL of the compiled template.
9674 *(Function)*: Returns the compiled template function.
9678 // Use the "interpolate" delimiter to create a compiled template.
9679 var compiled = _.template('hello <%= user %>!');
9684 var compiled = _.template('<b><%- value %></b>');
9689 var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
9694 var compiled = _.template('<% print("hello " + user); %>!');
9698 // Use the ES template literal delimiter as an "interpolate" delimiter.
9700 var compiled = _.template('hello ${ user }!');
9705 var compiled = _.template('<%= "\\<%- value %\\>" %>');
9711 var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
9715 // Use the `sourceURL` option to specify a custom sourceURL for the template.
9716 var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
9720 // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
9721 var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
9729 // Use custom template delimiters.
9731 var compiled = _.template('hello {{ user }}!');
9739 "main": ' + _.template(mainText).source + '\
11220 (Object): By default, the template delimiters used by lodash are like those in
11221 embedded Ruby *(ERB)* as well as ES2015 template strings. Change the
11222 following template settings to use alternative delimiters.
11255 (Object): Used to import variables into the compiled template.
11277 (string): Used to reference the data object in the template text.