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

  • Home
  • SEARCH
  • 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 8011513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T19:02:21+00:00 2026-06-04T19:02:21+00:00

I am learning Backbone/Handlebars/Require. I have looked all over online and on SO –

  • 0

I am learning Backbone/Handlebars/Require. I have looked all over online and on SO – are there any tutorials or websites that you can direct me to that would provide helpful information for using using handlebars instead of underscore?

  • 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-04T19:02:23+00:00Added an answer on June 4, 2026 at 7:02 pm

    Using handlebars.js instead of underscore templating is pretty straightforward. Check out this example:

    https://cdnjs.com/libraries/backbone.js/tutorials/what-is-a-view
    (scroll to the “Loading a Template” section)

    SearchView = Backbone.View.extend({
        initialize: function(){
            this.render();
        },
        render: function(){
            // Compile the template using underscore
            var template = _.template( $("#search_template").html(), {} );
            // Load the compiled HTML into the Backbone "el"
            this.el.html( template );
        }
    });
    

    Basically, the convention in backbone is to build your html in a render function. The use of templating engine is left completely up to you (which I like about Backbone). So you’d just change it to:

    SearchView = Backbone.View.extend({
        initialize: function(){
            this.render();
        },
        render: function(){
            // Compile the template using Handlebars
            var template = Handlebars.compile( $("#search_template").html() );
            // Load the compiled HTML into the Backbone "el"
            this.el.html( template );
        }
    });
    

    Since you’re using require.js, you can make Handlebars a dependency at the top of your module. I’m pretty new to this, but it sounds like the learning to focus on would be Backbone.js patterns and require.js usage.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I learning Perl and I want to create a simple application that gets all
I just started learning Backbone.js, and have been working on (what else) a simple
For a week i started learning how to use require.js with Backbone.js and Underscore.js
I'm still learning Backbone but it is my understanding that it should handle updating
I am in the process of learning Backbone.js. I currently assume that if one
learning Jquery and integrating with PHP - getting there, but have one last challenge
So, I am learning out backbone.js and are currently iterating over some models in
From couple of days, I have started working/learning the backbone.js . I have read
I'm learning Backbone.js and am trying to figure out whether it's possible to have
I'm learning backbone.js and already have a problem. I'm loading my scripts with LABjs

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.