title: How to pass parameters to a controller when using route?
body: <p>In my application, am loading views using ngRoute, </p>
  
  <pre><code> .state('ReportViewer', {
              url: "/ReportViewer",
              controller: 'ReportViewerControl',
              templateUrl: "views/Report_viewer.html"
          })
  </code></pre>
  
  <p>I have a search Panel where users can search reports, and when selecting a report, it should route to a different page and load the report inside an iframe. Here is my code when the user select the report,</p>
  
  <pre><code> $scope.goReport = function(report){
           $state.go('ReportViewer');
          }
  </code></pre>
  
  <p>I have defined a constant in the config which changes dynamically based on the report selection</p>
  
  <pre><code>   .constant('Digin_ReportViewer','http://192.226.192.147:8080/api/repos/%3Ahome%3Aadmin%')
  </code></pre>
  
  <p>Here i need to pass the 'Report' variable to the <code>ReportViewerControl</code> when the user select the report,</p>
  
  <p>Here is my <code>ReportViewerControl</code></p>
  
  <pre><code> routerApp.controller('ReportViewerControl', ['$scope', '$routeParams','Digin_ReportViewer',function($scope, $routeParams,Digin_ReportViewer) {
  
      //here i need to append the report url ,
      $scope.reportURL = Digin_ReportViewer+routeParams.report ; 
    $scope.trustSrc = function(src) {
         return $sce.trustAsResourceUrl(src);
      }
  }
  ]);
  </code></pre>