title: get an undifined $scope in angularJS using api
body: <p>I'm new in angularJS and I got a small problem which is : 
  (i'll explain some details)
  I have a SQL database which is deployed in Azure and I get the data from web services.</p>
  
  <p>when I want to retrieve data from the database and expose it in the view , it works.</p>
  
  <p>this is the controller : </p>
  
  <pre><code>    var app = angular.module('ngdemoApp.controllers', []);    
  app.controller('CustomerViewCtrl', ['$scope', '$routeParams', 'ShowCustomerFactory','LikeProfilCustomerFactory','ShowManagerFactory',
                                  function ($scope, $routeParams, ShowCustomerFactory,LikeProfilCustomerFactory,ShowManagerFactory) {
                                  $scope.incrementLikeProfil = function (id) {                        LikeProfilCustomerFactory.likeProfil({id:$scope.customer.Id});
                                          $scope.customer = ShowCustomerFactory.show({id: $routeParams.id});
                                      }
  
                                      $scope.customer = ShowCustomerFactory.show({id: $routeParams.id});      
                                  }]);
  </code></pre>
  
  <p>notice that the customer is in the database so it has properties in other word if I do <code>{{customer.Id}}</code> this expression shows me the value in the view.</p>
  
  <p>However, when I want to use the <code>$scope.customer</code> in the controller like this </p>
  
  <pre><code>app.controller('CustomerViewCtrl', ['$scope', '$routeParams', 'ShowCustomerFactory','LikeProfilCustomerFactory','ShowManagerFactory',
                                  function ($scope, $routeParams, ShowCustomerFactory,LikeProfilCustomerFactory,ShowManagerFactory) {
  
  
                                      $scope.incrementLikeProfil = function (id) {
  
                                          LikeProfilCustomerFactory.likeProfil({id:$scope.customer.Id});
                                          $scope.customer = ShowCustomerFactory.show({id: $routeParams.id});
                                      }
  
                                      $scope.customer = ShowCustomerFactory.show({id: $routeParams.id});  
  
                                      $scope.test = $scope.customer.Id;
  
                                  }]);
  </code></pre>
  
  <p>the <code>$scope.test</code> cannot be filled by <code>$scope.customer.Id</code>, at the same time the <code>$scope.customer</code> is filled and the view can display the value of customer but when I want to display the <code>$scope.test</code> in the view, i didn't get any responce.</p>
  
  <p>Is there any solution ? Thank you</p>