Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7833991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T13:00:06+00:00 2026-06-02T13:00:06+00:00

Just getting started with Tempo javascript templating engine. In all examples in the documentation,

  • 0

Just getting started with Tempo javascript templating engine. In all examples in the documentation, the collection you are iterating over is an array of objects or arrays, and in the templates you refer to property names (i.e. {{name}}) or array indexes (i.e. {{[0]}}). But what if I’m iterating over an array of simple types like strings? Is there a way to refer to the the object itself in the template? something like {{this}}?

For example:

var data = [ "All", "Europe", "Asia", "America", "India"];
Tempo.prepare("locations").render(data);

Now I want to render my data to a list in a template:

<ul id="locations">
   <li data-template>
       {{?????}}
    </li>
</ul>

How do I refer to an individual array item in the example above?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T13:00:08+00:00Added an answer on June 2, 2026 at 1:00 pm

    Thanks for pointing this out Todd. With Tempo 1.8+ you can refer to the object being iterated using:

    {{.}}
    

    For example:

    <ul id="locations">
       <li data-template>
           {{.}}
        </li>
    </ul>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm just getting started with NHibernate and reading blogs and articles from all over.
I am just getting started with the Facebook JavaScript SDK, all I want to
I'm just getting started with a project that combines GWT, Google App Engine and
Just getting started with XPath, and using it's implementation with PHP's SimpleXML objects. Right
I'm just getting started in OO javascript so please bear with me. This works:
Just getting started with backbone, and I thought I was familiar with all the
Just getting started with C++ here. I am working on OSX with Eclipse CDT.
Just getting started with db2. Quick question about giving it SQL commands from a
Just getting started on NVelocity (v1.1.1) and it seems to be working just fine.
Just getting started building an app using the v6 of the facebook c# sdk

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.