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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T14:25:01+00:00 2026-06-03T14:25:01+00:00

I have a problem with a backbone.js namespacing app demo, i’m trying to display

  • 0

I have a problem with a backbone.js namespacing app demo, i’m trying to display a simple list of element stored locally, when i call the app the console retrieves this error

App.model.club is not a constructor

the portionof code is in the router secion;

 initialize: function () {
   console.log('App.router Initialized');
   App.clubCollection = new App.collection.clubs();
   localStorage.clear();
   App.clubCollection.create(new App.model.club({id: 1, name:'Open Baladin', category: 'Pubs'}));
   App.clubCollection.create(new App.model.club({id: 2, name:'Ai marmi', category: 'Ristorante'}));
   App.clubCollection.create(new App.model.club({id: 3, name:'Branca Leone', category: 'Disco'}));

},

the error accoured at the fifth line in the above partion code.

this is the namespace file app.js:

window.App = {
model:  {},
view:   {},
collection: {},
router:  {},
util: {},
data: {},
contentHolder : $('#app').find(":jqmData(role='content')"),
container:$('#app'),

init: function() {
    console.log('window.App Initialized')
    new App.router();
    Backbone.history.start();
}
}

an this is the module file:

App.model.club = App.model.club || {}

App.model.club = Backbone.Model.extend({

defaults: {
    'id' : 1
    'name' : 'Open Baladin',
    'category' : 'Pubs'
},

initialize: function() {
    console.log('App.model.club initialized');
}
});
  • 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-03T14:25:01+00:00Added an answer on June 3, 2026 at 2:25 pm

    You forgot à comma after ‘id’: 1

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

Sidebar

Related Questions

I'm currently trying Backbone.js along with a rails app. My problem is, that I
I started my first backbone.js app today and I meet a first problem. I
I'm currently working with backbone.js and I have a strange problem : I have
I have a question about the architecture of a backbone.js web app. Let's say
I have a Rails 3.1 app that uses the codebrew/backbone-rails . In a .jst.ejs
I'm porting an old app to use backbone.js (hopefully) Problem is none of the
I'm learning backbone.js and already have a problem. I'm loading my scripts with LABjs
I am trying to combine socket.io with backbone.js. I have found a piece of
I want to override backbone.sync i have already asked this but the problem is
I have the following backbone.js controller: App.Controllers.PlanMembers = Backbone.Controller.extend({ routes: { message/:messageType: sendMessage, :

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.