JavaScript Backbone sent userinfo after login

I'm making some kind of pinterest backbone application. (post pics/vids/text etc to remember later) It is the first time I try to make a register/login in backbone.

I have a homeView and an OverviewView at the moment. If a user registers now I use this function:

this.usersCollection.create({

    firstName: this.$el.find('.registerFirstName').val(),
    lastName: this.$el.find('.registerLastName').val(),
    email: this.$el.find('.registerEmail').val(),
    password: this.$el.find('.registerPassword').val()

}, {
success: function(response){
    Backbone.history.navigate("#overview", true);

}

});

this is working, it creates the user in my database and redirects to overview. But now on overview I have to know which id this user has (same if login instead of register). What is the best way to either send the model that was created or its id to the overviewView so it can get items from the database that correspond to that user?

Thanks in advance, Pieter-Jan

Answer:1

I'm doing JavaScript in node.js. I'm trying wrap an object not yet constructed, allowing calls to any object function and set/get any object attribute through the wrapper, letting the wrapper pass ...

I'm doing JavaScript in node.js. I'm trying wrap an object not yet constructed, allowing calls to any object function and set/get any object attribute through the wrapper, letting the wrapper pass ...

You are programming a lib X that depends on lib Y. You want that library to work on node.js and on the browser. On node.js, you'd use require('Y'). On the browser, you could use require.js. What's the ...

You are programming a lib X that depends on lib Y. You want that library to work on node.js and on the browser. On node.js, you'd use require('Y'). On the browser, you could use require.js. What's the ...

  1. module system of study
  2. module system and services inc
  3. module system of education
  4. module system for c++
  5. module system for javascript
  6. module of system
  7. system module for project

I'd like to create a simple BMI calculator (MS Dynamics 2011) I have 3 fields: 1: persons height (precision 2 - decimal formatted text box) 2. persons weight (precision 2 - decimal formatted text ...

I'd like to create a simple BMI calculator (MS Dynamics 2011) I have 3 fields: 1: persons height (precision 2 - decimal formatted text box) 2. persons weight (precision 2 - decimal formatted text ...

  1. calculation syntax in tableau
  2. calculation syntax in sql

Let's say I have the following string: var str = "I like barbeque at dawn"; I want pairs of all words which are separated by a space. This can be achieved via the following regular expression: ...

Let's say I have the following string: var str = "I like barbeque at dawn"; I want pairs of all words which are separated by a space. This can be achieved via the following regular expression: ...

  1. regular expression create online
  2. regular expression create
  3. regular expression create string
  4. regular expression create table
  5. regular expression create new line
  6. regular expression create list
  7. regular expression c# create
  8. create regular expression from text
  9. create regular expression from string online
  10. create regular expression javascript
  11. create regular expression online c#
  12. create regular expression pattern online
  13. create regular expression online java
  14. create regular expression in java
  15. create regular expression python
  16. create regular expression online javascript
  17. create regular expression from string javascript
  18. create regular expression online python
  19. create regular expression online php
  20. create regular expression for password