title: MEAN Stack - pass variables from html view to ng-controller
body: <p>I have developed a profile page which contains several modules such as, let's say : personal info and friends.</p>
  
  <p>Each modules is a ng-controller which makes database calls but I would like to be able to pass the id of the user of whom the profile is being displayed so that database calls are dynamics and retrieve data related to this user.</p>
  
  <p>How I am supposed to do that?</p>
  
  <p>Thanks in advance,</p>
  
  <p>Manuel</p>
  
  <p><strong>* Clarification *</strong>
  I am using express.js which handles authentication and session management (with Passport).
  Once the user is logged in he reaches the "/profile" page.</p>
  
  <p>I didn't particularly want to handle routing on several sides so I decided to handle all routing on Node side. So I have created routes for get and post calls.</p>
  
  <p>Now, when the user arrives on "/profile" I would like the different modules (personnal info, friends, etc.) to update based on the person connected.</p>
  
  <p>I managed to do non-dynamic call :</p>
  
  <pre><code>app.controller('UserInfo', [
  '$scope', '$http',
  function($scope, $http) {
      $http.get("/api/users/info/1")
      .then(function(response) {
          $scope.user = response.data.local;      
      });
  }
  ]);
  </code></pre>
  
  <p>But this doesn't depend on the context. So I would like now to create get calls the same way but being able to pass the id (or any other proper way) of the user to retreive his data.</p>
  
  <p>Would you have any recommendation as to how to proceed? Any link to tutorials on how to handle this in multi-page MEAN application? Most of documents I found on the internet are related to single-page applications and don't answer my need.
  Thanks!</p>