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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T13:15:57+00:00 2026-06-16T13:15:57+00:00

I wrote a backbone.js app that uses require.js and is broken up with models/,

  • 0

I wrote a backbone.js app that uses require.js and is broken up with models/, collections/ and so forth. I then wrote another app that depends on the first app (and some other things. The files are laid out like so:

/scripts/appA/
             models/
             collections/
             views/
/scripts/appNeedsA/
             models/
             collections/
             views/

What do I put in the needsA to require appA? The below seems logical to me but doesn’t work. If I use ../../appA, that finds appA but IT’s dependencies can’t be found because the root is wrong.

define(
  ['underscore', 'backbone', '../appA'],
  function (_, Backbone, appA) {
     ...
  }
  • 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-16T13:15:59+00:00Added an answer on June 16, 2026 at 1:15 pm

    The proper solution is to:

    define(
      ['underscore', 'backbone', 'appA/views/whatever'],
      function (_, Backbone, appAWhateverView) {
         ...
     }
    

    and to set your require.config paths to include:

    require.config({
        paths: {
             appA: '../appA'
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I hope you are all well! A question for an app that uses Backbone.js
in backbone we have an app that uses an event Aggregator, located on the
I'm trying to make a quick sample Backbone.js app that has a Post model,
I'm currently getting started with Backbone.js. I've wrote some examples with Backbone and they
I'm writing a backbone app, and using the built-in event handling, which uses jquery
I am converting my backbone app so that it starts communicating with the server,
I'm doing some due diligence on backbone for a single page app and wonder
I have a schedule/calendar app that I wrote in Rails that I'm rewriting using
I started my first backbone.js app today and I meet a first problem. I
I wrote some script in a site. The script makes a new spreadsheet and

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.