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 7545405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T08:55:14+00:00 2026-05-30T08:55:14+00:00

I am following the tuturoial here: http://backbonetutorials.com/organizing-backbone-using-modules/ and all I would like to do

  • 0

I am following the tuturoial here: http://backbonetutorials.com/organizing-backbone-using-modules/ and all I would like to do is use Mustache instead of underscore.js for my templating engine in a Backbone View. Everything is working as expected until I try to do the replacement of Mustache. Firebug gives me this:

Load timeout for modules: Mustache

My Mustache wrapper (in libs/mustache/mustache-wrap.js) is like so:

define(['libs/mustache/mustache'], function(){
  // Tell Require.js that this module returns a reference to Mustache
  return Mustache;
});

Here is the code for my Backbone View:

// Protocol Detail View
define([
  'jQuery',
  'Underscore',
  'Backbone',
  'Mustache',
  'collections/protocols',
  'text!templates/protocol/protocoldetail.html'
], function($, _, Backbone, Mustache, protocolCollection, protocolDetailTemplate){

    var protocolDetailView = Backbone.View.extend({

        el: "#asset-detail",
        render: function( pid ){
            this.collection = new protocolCollection;
            this.collection.fetch();
            var p = this.collection.getByCid('c'+pid);
            var template = "{{name}}";
            htmlr = Mustache.to_html(template, p);
            $(this.el).html(htmlr);
            //var compiledTemplate = _.template( protocolDetailTemplate, { protocol: protocol });
            //$(this.el).html(compiledTemplate);

        },

        events: {
            "submit #asset-owner": "chown"
        },

        chown: function ( pid ){
            console.log("Protocol Detail View chown callback.")
        }
    });

    return new protocolDetailView;
});

My main.js file has the following config:

require.config({
    paths: {
      jQuery: 'libs/jquery/jquery',
      jQueryUI: '//ajax.aspnetcdn.com/ajax/jquery.ui/1.8.17/jquery-ui.min',
      jstree: 'libs/jstree/jquery.jstree',
      Mustache: 'libs/mustache/mustache-wrap',
      Underscore: 'libs/underscore/underscore',
      Backbone: 'libs/backbone/backbone'
  }
});
  • 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-05-30T08:55:16+00:00Added an answer on May 30, 2026 at 8:55 am

    In you main.js file where you have all you’re requires, make sure to add Mustache to the config, and don’t worry about the wrapper and just try loading Mustache directly.

    require.config({ 
        'paths': { 
            "underscore": "libs/underscore", 
            "backbone": "libs/backbone",
            "Mustache": "libs/mustache/mustache"
        }
    }); 
    

    That might help…

    Also, here are some starter apps to help you out on your require, backbone journey.

    https://github.com/jcreamer898/RequireJS-Backbone-Starter
    https://github.com/david0178418/BackboneJS-AMD-Boilerplate
    https://github.com/addyosmani/backbone-fundamentals
    https://github.com/amdjs

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

Sidebar

Related Questions

I'm following this tutorial here: http://brenelz.com/blog/implementing-paging-using-php-and-jquery/ Here is what I have: http://eataustineat.com/testingfolder/ I've encountered
Kind of following this tutorial here: http://mobile.tutsplus.com/tutorials/iphone/iphone-core-data/ I use the fetch records method in
I am following the tutorial here: http://www.aspfree.com/c/a/XML/Applying-XSLT-to-XML-Using-ASP.NET/2/ The tutorial shows how one converts xml
I'm following the tutorial here http://applicake.com/posts/54-integrating-facebook-connect-with-rails-applications to set up facebook connect. It almost worked,
I am following the following tutorial ( http://www.highoncoding.com/Articles/642_Creating_a_Stock_Widget_in_ASP_NET_MVC_Application.aspx ) on using ajax to render
I am using following a tutorial from here: http://www.shopdev.co.uk/blog/cookies-with-jquery-designing-collapsible-layouts/ This is the script I
I'm trying to make modal frame in Java Applet such like shown here: http://www.java2s.com/Tutorial/Java/0240__Swing/Showthegivenframeasmodaltothespecifiedowner.htm
I'm following a tutorial on Zend Framework here (http://www.ibm.com/developerworks/opensource/tutorials/os-php-zend2/section2.html). I barely got started, but
I am following a tutorial on http://msdn.microsoft.com/en-us/wp7trainingcourse_usingbingmapslab_topic3#_Toc271039355 . Source code can be found here:
I'm following the tutorial here: http://iphone-3d-programming.labs.oreilly.com/ch01.html#ch01_id36002837 When I try to run the program, I

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.