title: how to use session in angularjs
body: <p>I am creating a web app in which i want to store userid and role in <code>session</code> through <code>Angularjs</code></p>
  
  <p>this is my Angularjs file</p>
  
  <pre><code>$http.get('/login.asmx/loginuser', {
                  params: {
                      log: $scope.log,
                      pm: $scope.pm,
                      password: $scope.password
                  }
              })
              .then(function (response) {
                  {
                      $scope.suc = response.data;
                      console.log(response.data);
                      if (response.data == 'success') {
                          console.log('success');
                          $window.location.href = "../welcomepage/welcometable";
                      }
                      else
                      {
                          console.log('nosuccess');
                          $window.location.href = "../Login/Index";
                      }
                  }
              })
  </code></pre>
  
  <p>i need to store <code>$scope.pm</code> and <code>$scope.log</code> in my session and want to use the same on my welcome page</p>
  
  <p>how to store and use sessions in angularjs?</p>