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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:16:40+00:00 2026-05-27T16:16:40+00:00

Background I have a long list of models and views made with backbone.js –

  • 0

Background

I have a long list of models and views made with backbone.js – but not all users will open all views.
I use require.js to load JavaScripts files and templates.

What I have now

I have a router that knows about all views. Since the router know this, all views, models and templates are therefore loaded at startup – this also loads randomly visited views.

Problem

How can I use require.js to load the JavaScripts when needed? Not in the initial startup, but when user first opens a view.

UPDATE
I can now get this working as commented in answer below.

In router I have a require per route:

require(["yourmodule"], function(MyModule){
    //...
})
  • 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-27T16:16:41+00:00Added an answer on May 27, 2026 at 4:16 pm

    This is a great guide for marrying Backbone.js and Require.js:

    http://backbonetutorials.com/organizing-backbone-using-modules/

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

Sidebar

Related Questions

All, I have a long running process that I run on a background thread
As background I have a very long ID that too long to display in
Here is the situation: You have one long-running calculation running in a background thread.
Background I have an array of objects (Users) defined and set as follows: //
I have a white background but with this layout i am blocked because text
Background: This is a request for something that may not exist yet, but I've
Background I have made a Web Service in Visual Studio, and I'm trying to
I have a list view. While clicking the listview an intent is called.. But
I have a div with a fixed height of 400px and a long list
i have a set of items (or a list of items, but i don't

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.